The Email Recipient User-Exit can be used for two purposes:
- To set the communication language
- To add/change the recipients of the e-mail
The parameters for the user-exit are:
Parameter | Type | SAP Type | Description |
---|---|---|---|
IM_ETYPE | Import | /FLOE/ETYPE_CODE | The selected e-mail type |
IM_DOCUMENT | Import | /FLOE/DOC_REF | The external document reference if passed in to the API |
IM_VARIABLES | Import | /FLOE/VARS_T |
Table of all the variables passed in to the API Note that this user-exit is called before the Email Data User-Exit, because the Variable data may depend on the communication language determined in this User-Exit. Therefore, variables determined in the Email Data User-Exit are not passed into this User-Exit |
CH_ELANG | Changing | /FLOE/ELANG | The Communication Language passed in to the API |
CH_RECIPIENTS | Changing | /FLOE/REC_EMAIL_T |
Table of the recipient e-mail addresses passed in to the API |
Add logic to determine the communication language and recipients based on e-mail type, external document reference and variables.
When adding a recipient, you must add the recipient type:
Type | Description |
---|---|
1 | TO |
2 | CC |
3 | BCC |
Example code:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: |
*---------------------------------------------------------------------------* * <<< Start of Customer Code >>> * *---------------------------------------------------------------------------* DATA: ls_recipients TYPE /floe/rec_email_s. ls_recipients-email = 'michael.ball@bbc.co.uk'. ls_recipients-type = '1'. APPEND ls_recipients TO ch_recipients. *---------------------------------------------------------------------------* * <<< End of Customer Code >>> * *---------------------------------------------------------------------------* |