SAP TRINT_GTABKEY_PREP_RFCMAIL Function Module for Prepare and Call Mailing
TRINT_GTABKEY_PREP_RFCMAIL is a standard trint gtabkey prep rfcmail SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Prepare and Call Mailing 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 trint gtabkey prep rfcmail FM, simply by entering the name TRINT_GTABKEY_PREP_RFCMAIL into the relevant SAP transaction such as SE37 or SE38.
Function Group: SGTA
Program Name: SAPLSGTA
Main Program: SAPLSGTA
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TRINT_GTABKEY_PREP_RFCMAIL 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 'TRINT_GTABKEY_PREP_RFCMAIL'"Prepare and Call Mailing.
EXPORTING
* I_MAIL_RFC_ISSUES = ' ' "Single-character indicator
* I_CDLVUNIT = '*' "Software component
* I_FCG = ' ' "User name
* I_FCG_2 = ' ' "User name
I_CALLED_BY_REPORT = "ABAP program name
IMPORTING
E_MAIL_SENT = "'X', if mail was sent
EXCEPTIONS
MAIL_NOT_SENT = 1 MAIL_NOT_CUSTOMIZED = 2 NO_IMPORT_PARAMETER = 3
IMPORTING Parameters details for TRINT_GTABKEY_PREP_RFCMAIL
I_MAIL_RFC_ISSUES - Single-character indicator
Data type: CHAR1Default: ' '
Optional: Yes
Call by Reference: Yes
I_CDLVUNIT - Software component
Data type: DLVUNITDefault: '*'
Optional: Yes
Call by Reference: Yes
I_FCG - User name
Data type: SY-UNAMEDefault: ' '
Optional: Yes
Call by Reference: Yes
I_FCG_2 - User name
Data type: SY-UNAMEDefault: ' '
Optional: Yes
Call by Reference: Yes
I_CALLED_BY_REPORT - ABAP program name
Data type: PROGNAMEOptional: No
Call by Reference: Yes
EXPORTING Parameters details for TRINT_GTABKEY_PREP_RFCMAIL
E_MAIL_SENT - 'X', if mail was sent
Data type: CHAR1Optional: No
Call by Reference: Yes
EXCEPTIONS details
MAIL_NOT_SENT - Could not send mail
Data type:Optional: No
Call by Reference: Yes
MAIL_NOT_CUSTOMIZED - No entry in GTABKEY_CUST
Data type:Optional: No
Call by Reference: Yes
NO_IMPORT_PARAMETER - No 'X' specified in import parameter
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for TRINT_GTABKEY_PREP_RFCMAIL 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_e_mail_sent | TYPE CHAR1, " | |||
| lv_mail_not_sent | TYPE CHAR1, " | |||
| lv_i_mail_rfc_issues | TYPE CHAR1, " ' ' | |||
| lv_i_cdlvunit | TYPE DLVUNIT, " '*' | |||
| lv_mail_not_customized | TYPE DLVUNIT, " | |||
| lv_i_fcg | TYPE SY-UNAME, " ' ' | |||
| lv_no_import_parameter | TYPE SY, " | |||
| lv_i_fcg_2 | TYPE SY-UNAME, " ' ' | |||
| lv_i_called_by_report | TYPE PROGNAME. " |
|   CALL FUNCTION 'TRINT_GTABKEY_PREP_RFCMAIL' "Prepare and Call Mailing |
| EXPORTING | ||
| I_MAIL_RFC_ISSUES | = lv_i_mail_rfc_issues | |
| I_CDLVUNIT | = lv_i_cdlvunit | |
| I_FCG | = lv_i_fcg | |
| I_FCG_2 | = lv_i_fcg_2 | |
| I_CALLED_BY_REPORT | = lv_i_called_by_report | |
| IMPORTING | ||
| E_MAIL_SENT | = lv_e_mail_sent | |
| EXCEPTIONS | ||
| MAIL_NOT_SENT = 1 | ||
| MAIL_NOT_CUSTOMIZED = 2 | ||
| NO_IMPORT_PARAMETER = 3 | ||
| . " TRINT_GTABKEY_PREP_RFCMAIL | ||
ABAP code using 7.40 inline data declarations to call FM TRINT_GTABKEY_PREP_RFCMAIL
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_i_mail_rfc_issues) | = ' '. | |||
| DATA(ld_i_cdlvunit) | = '*'. | |||
| "SELECT single UNAME FROM SY INTO @DATA(ld_i_fcg). | ||||
| DATA(ld_i_fcg) | = ' '. | |||
| "SELECT single UNAME FROM SY INTO @DATA(ld_i_fcg_2). | ||||
| DATA(ld_i_fcg_2) | = ' '. | |||
Search for further information about these or an SAP related objects