Professional Documents
Culture Documents
g_cont_par-device = 'MAIL'.
* Calling Smartform
CALL FUNCTION fm_name
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
control_parameters = g_cont_par
mail_appl_obj = g_mail_app_obj
mail_recipient = g_mail_rec_obj
mail_sender = g_mail_sen_obj
output_options = g_output
user_settings = ' '
IMPORTING
... rest of function ...
COMMIT WORK.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*&---------------------------------------------------------------------*
*& Form mail_sender_object
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* <--P_G_MAIL_SEN_OBJ text
*----------------------------------------------------------------------*
FORM mail_sender_object CHANGING p_mail_sen_obj.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*&---------------------------------------------------------------------*
*& Form mail_appl_object
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* <--P_G_MAIL_APP_OBJ text
*----------------------------------------------------------------------*
FORM mail_appl_object CHANGING p_mail_app_obj.
SELECT * FROM soud WHERE sapnam LIKE sy-uname AND deleted = ' '.
ENDSELECT.
IF sy-subrc NE 0.
CLEAR sofmfol_key.
sofmfol_key-type = 'FOL'.
sofmfol_key-year = soud-inbyr.
sofmfol_key-number = soud-inbno.
bor_key = sofmfol_key.
IF NOT bor_key IS INITIAL.
swc_create_object folder 'SOFMFOL' bor_key.
IF sy-subrc = 0.
swc_object_to_persistent folder p_mail_app_obj.
IF sy-subrc NE 0.
CLEAR p_mail_app_obj.
ENDIF.
ENDIF.
ELSE.
CLEAR p_mail_app_obj.
ENDIF.
Please also search for "email" in this forum concerning the connection from SAP to a mailsystem.
If everything works you can check the mailtraffic in TA SOST.
Hope this helps you a bit further