SAP Knowledge Base Article - Public

2623964 - Unable To Send Attachments With Workflow Rules

Symptom

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.

Environment

SAP Hybris Cloud for Customer 1802/03.

Reproducing the Issue

  1. Go to the Administrator work center.
  2. Select the Workflow Rule view.
  3. Click on New.
  4. Go to the step 3 Define Actions.
  5. Select the Notification Type as E-mail
  6. Mark the checkbox Add Attachment. You will notice that there is no way to select any attachment file.

Cause

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 Soultion name -> Add > New Item -> Enhancement Implementation.

kba 1.png

- 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.

kba2.png

- Now two files (as shown in below screenshot) will get created.

kba 3.png

- Open .fltr file and select business object from drodown on which you want to define workflow rule.

kba4.png

- Now Implement your custom logic. In below link you can see sample implenmentaion fort he same.

https://blogs.sap.com/2013/12/03/how-to-send-an-email-with-attachments-in-sap-cloud-application-studio/

Once BADI has been implemented and activated, then PDI attachment will be send out from outgoing e-mails from Workflow.

Resolution

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.

Keywords

Workflow Rule; E-mails; Attachments , KBA , LOD-CRM-WKF , Workflow , How To

Product

SAP Cloud for Customer all versions