SAP DPR_STAT_REP_MAIL Function Module for Mail verschicken
DPR_STAT_REP_MAIL is a standard dpr stat rep mail SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Mail verschicken processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for dpr stat rep mail FM, simply by entering the name DPR_STAT_REP_MAIL into the relevant SAP transaction such as SE37 or SE38.
Function Group: DPR_STAT_REP
Program Name: SAPLDPR_STAT_REP
Main Program: SAPLDPR_STAT_REP
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function DPR_STAT_REP_MAIL pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'DPR_STAT_REP_MAIL'"Mail verschicken.
EXPORTING
IV_MAIL_SUBJECT = "Betreff Mail
* IV_DOC_TYPE = 'RAW' "Document type
* IV_COPY_TO_SENDER = 0 "
* IV_READ_SEND_REQUEST = 1 "
IT_MAIL_TEXT = "Mailtext
IT_RECIPIENTS_MAIL = "Mailadressen Empfänger Statusbericht
* IT_RECIPIENTS_MAIL_CC = "Mailadressen Empfänger Statusbericht
* IT_RECIPIENTS_MAIL_BCC = "Mailadressen Empfänger Statusbericht
IT_DOC_FILE_DATA = "Attachment File Daten
IT_DOC_FILE_CONTENT = "Attachment File Content
IMPORTING
EV_ERROR_MSGS = "Concatenierte Fehlermeldungen
IMPORTING Parameters details for DPR_STAT_REP_MAIL
IV_MAIL_SUBJECT - Betreff Mail
Data type: SO_OBJ_DESOptional: No
Call by Reference: No ( called with pass by value option)
IV_DOC_TYPE - Document type
Data type: SO_OBJ_TPDefault: 'RAW'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_COPY_TO_SENDER -
Data type: IOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_READ_SEND_REQUEST -
Data type: IDefault: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)
IT_MAIL_TEXT - Mailtext
Data type: SOLI_TABOptional: No
Call by Reference: No ( called with pass by value option)
IT_RECIPIENTS_MAIL - Mailadressen Empfänger Statusbericht
Data type: DPR_TT_PSR_MAIL_ADDRESSESOptional: No
Call by Reference: No ( called with pass by value option)
IT_RECIPIENTS_MAIL_CC - Mailadressen Empfänger Statusbericht
Data type: DPR_TT_PSR_MAIL_ADDRESSESOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_RECIPIENTS_MAIL_BCC - Mailadressen Empfänger Statusbericht
Data type: DPR_TT_PSR_MAIL_ADDRESSESOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_DOC_FILE_DATA - Attachment File Daten
Data type: DPR_TT_DOC_FILE_DATAOptional: No
Call by Reference: No ( called with pass by value option)
IT_DOC_FILE_CONTENT - Attachment File Content
Data type: SOLIX_TABOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for DPR_STAT_REP_MAIL
EV_ERROR_MSGS - Concatenierte Fehlermeldungen
Data type: STRINGOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for DPR_STAT_REP_MAIL Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_ev_error_msgs | TYPE STRING, " | |||
| lv_iv_mail_subject | TYPE SO_OBJ_DES, " | |||
| lv_iv_doc_type | TYPE SO_OBJ_TP, " 'RAW' | |||
| lv_iv_copy_to_sender | TYPE I, " 0 | |||
| lv_iv_read_send_request | TYPE I, " 1 | |||
| lv_it_mail_text | TYPE SOLI_TAB, " | |||
| lv_it_recipients_mail | TYPE DPR_TT_PSR_MAIL_ADDRESSES, " | |||
| lv_it_recipients_mail_cc | TYPE DPR_TT_PSR_MAIL_ADDRESSES, " | |||
| lv_it_recipients_mail_bcc | TYPE DPR_TT_PSR_MAIL_ADDRESSES, " | |||
| lv_it_doc_file_data | TYPE DPR_TT_DOC_FILE_DATA, " | |||
| lv_it_doc_file_content | TYPE SOLIX_TAB. " |
|   CALL FUNCTION 'DPR_STAT_REP_MAIL' "Mail verschicken |
| EXPORTING | ||
| IV_MAIL_SUBJECT | = lv_iv_mail_subject | |
| IV_DOC_TYPE | = lv_iv_doc_type | |
| IV_COPY_TO_SENDER | = lv_iv_copy_to_sender | |
| IV_READ_SEND_REQUEST | = lv_iv_read_send_request | |
| IT_MAIL_TEXT | = lv_it_mail_text | |
| IT_RECIPIENTS_MAIL | = lv_it_recipients_mail | |
| IT_RECIPIENTS_MAIL_CC | = lv_it_recipients_mail_cc | |
| IT_RECIPIENTS_MAIL_BCC | = lv_it_recipients_mail_bcc | |
| IT_DOC_FILE_DATA | = lv_it_doc_file_data | |
| IT_DOC_FILE_CONTENT | = lv_it_doc_file_content | |
| IMPORTING | ||
| EV_ERROR_MSGS | = lv_ev_error_msgs | |
| . " DPR_STAT_REP_MAIL | ||
ABAP code using 7.40 inline data declarations to call FM DPR_STAT_REP_MAIL
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| DATA(ld_iv_doc_type) | = 'RAW'. | |||
| DATA(ld_iv_read_send_request) | = 1. | |||
Search for further information about these or an SAP related objects