cancel
Showing results for 
Search instead for 
Did you mean: 

Sent notification email to SC requestor of rejection and PO creation

vinita_kasliwal
Active Contributor
0 Kudos

Dear All

Please be so kind to let me know how to trigger a custom email notification to the requestor

for SC rejection and Po creation

I came across a couple of options as below :

1. Set alert configuration  it does not work as there is no option to customize text in here

General Configuration on Approval Alerts and Notifications - Supplier Relationship Management - SCN ...

2. I could set a check in DOC_check_BADI if any cart is rejected .. not sure on how I could trigger an email from there ..and specially how to check if PO gets created or not .

3. I could use the ZSRMOFFLINEAPPROVAL get report .. not sure on the code

4.  /SAPSRM/OFFLINEAPPROVALGET  again stuck at the code level .



Can some one please share some insight on which one is the most useful and if there is something in terms of code which can be shared for these 2 requirments

Please be so kind to help



Regards

Vinita


Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Vinita ,

Use BADI " /SAPSRM/OFFLINEAPPROVALGET" .


a) Get Recipient in method "IF_EX_BBP_OFFLINE_APP_BADI~RECIPIENTS_GET" .


IF g_stat EQ 'REJECTED'.

           CALL FUNCTION 'BBP_PD_SC_GETDETAIL'

             EXPORTING

               i_guid            = w_guid-guid

               IMPORTING

               e_header          = ls_header.


           LOOP AT ct_wi_recipient INTO w_rec.

             IF w_rec-userid NE ls_header-created_by.

               w_rec-userid = ls_header-created_by.

               APPEND w_rec TO ct_wi_recipient.

             ENDIF.

           ENDLOOP.

  ENDIF.


b) Send email in "IF_EX_BBP_OFFLINE_APP_BADI~MAIL_DATA_GET"


    Modify the body as per your requirement.


Thanks

Ankit Jain