When selecting the option Add Attachment within a Workflow Rule of the Notification Type E-mail, the system does not show you any option to add the attachment.
SAP Cloud for Customer
Reproducing the Issue
Go to the Administrator work center.
Select the Workflow Rule view.
Click on New.
- Go to the step 3 Define Actions.
- Select the Notification Type as E-mail
- Mark the checkbox Add Attachment. You will notice that there is no way to select any attachment file.
To use this feature you have to implement manually the PDI BADI pdi_wkf_badi_get_attachment. Once the BADI is implemented and the option Add Attachment is selected, the system will then trigger emails with attachments via Workflow Rules.
The steps to implement the PDI Badi are:
- Create a custom solution and implement a BADI inside it. To implement BADI, Right click on Solution name -> Add > New Item -> Enhancement Implementation.
- In Next window, select Namesapce as http://sap.com/xi/AP/Workflow/Global. All the Enhancement option resides under this namesapce will come as suggestion in dropdown to select Enhancement option.
- Select Enhancement option as ExitGettingWorkflowAttachment.
- Now two files (as shown in below screenshot) will get created.
- Open .fltr file and select business object from dropdown on which you want to define workflow rule.
- Now Implement your custom logic. In below link you can see sample implementation fort he same.
Once BADI has been implemented and activated, then PDI attachment will be send out from outgoing e-mails from Workflow.
This is the expected behavior for the Workflow Rules. In case you believe a different behavior should exist for this feature, then please submit an idea at: https://influence.sap.com/SAPCloudforCustomer.
Workflow Rule; E-mails; Attachments , KBA , LOD-CRM-WKF , Workflow , How To