The Email Body User-Exit can be used to change the generated e-mail body after variable substitution is complete.
The parameters of the User-Exit are:
Parameter | Type | SAP Type | Description |
---|---|---|---|
IM_ETYPE | Importing | /FLOE/ETYPE_CODE | The e-mail type passed in to the API |
IM_ELANG | Importing | /FLOE/ELANG | The communication language for the e-mail |
IM_DOCUMENT | Importing | /FLOE/DOC_REF | The external document reference if passed into the API |
IM_RECIPIENTS | Importing | /FLOE/REC_EMAIL_T | Table of recipients for the e-mail |
IM_VARIABLES | Importing | /FLOE/VARS_T | Table of variables and their values |
CH_EBODY | Changing | STRING | A string containing the entire e-mail body |
You can change the generated e-mail body based on the Email Type, Communication Language, External Document Reference, Recipients and Variables.
Sample code:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: |
*---------------------------------------------------------------------------* * <<< Start of Customer Code >>> * *---------------------------------------------------------------------------* DATA: ls_variables TYPE /floe/vars_s. READ TABLE im_variables INTO ls_variables WITH KEY var_code = 'BUKRS'. CHECK sy-subrc EQ 0. IF ls_variables-value EQ '1000'. REPLACE ALL OCCURRENCES OF 'Arch Consulting' IN ch_ebody WITH 'Arch Global'. REPLACE ALL OCCURRENCES OF 'Arial' IN ch_ebody WITH 'Helvetica'. ENDIF. *---------------------------------------------------------------------------* * <<< End of Customer Code >>> * *---------------------------------------------------------------------------* |