cancel
Showing results for 
Search instead for 
Did you mean: 

BADI to execute after BBP_ECS_PO_OUT BADI

Former Member
0 Kudos

Hi All,

I have a requirement to trigger mail to requisitioner after the PO has been transferred to Backend ECC system. As extended classic scenario is implemented we are using BBP_ECS_PO_OUT BADI for Purchase Order replication from SRM 5.0.

We are able to trigger email before the completion of  method BBP_B46B_PO_OUTBOUND. But the PO status is changed only after the execution of the method and my requirement is to trigger mail after checking the status of the PO.

If the PO is replicated successfully, a success mail has to be triggered.

Else if the PO status is I1132 --> Transfer Failed (E.Sys.) then a mail to notify the buyer about the failed PO transfer.

Is there any BADI which can be triggered after BBP_ECS_PO_OUT BADI?

Thanks & regards,

Ajit

Accepted Solutions (1)

Accepted Solutions (1)

ivy_li
Active Contributor
0 Kudos

Hi Ajit,

To realize your expectation, I suggest you read the following wiki page:How to debug trigger creation - Supplier Relationship Management - SCN Wiki

This describe the functionality how output is triggered, and other options to realize customer's expectations.

BR,
Ivy

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Vinita/Li,

Thanks for the suggestions!!!

I had this requirement on top priority, we created an enhancement in FM SPOOL_DPO_TRANSFER_DO

ENHANCEMENT ZSC_EMAIL.   

DATA : po_number TYPE crmd_orderadm_h-object_id.

*Get the PO number based on GUID

SELECT SINGLE object_id INTO po_number FROM crmd_orderadm_h

                                        WHERE guid = iv_guid.

IF sy-subrc IS INITIAL.


    CALL FUNCTION 'ZSC_APPR_EMAIL'

     EXPORTING

       guid   = iv_guid

       po_num = po_number.

ENDIF.

 

ENDENHANCEMENT.



In FM ZSC_APPR_EMAIL we had the code to determine the user/recipient details, Status of PO and email content.

ivy_li
Active Contributor
0 Kudos

Hi,

Thanks for sharing the solution.

BR,
Ivy

vinita_kasliwal
Active Contributor
0 Kudos

Hi Ajit

Refer below link

I had a similar requirement

and I have coded after the BAPI_PO_CREATE1 is called

in one of these classes :Method : Create_document .

CL_BBP_BS_ADAPTER_PO_CRT_ERP10

CL_BBP_BS_ADAPTER_PO_CRT_470_1

The code which you should put is :

CHECK sy-subrc = 0.

READ TABLE et_return2 INTO wa_return WITH KEY TYPE = 'E'.

IF SY-SUBRC = 0.

Notify via email that the Po got failed to create

else:

Success mail to be sent

ENDIF.

Debugging Guide for SRM PO transfer (Extended Classic Scenario) - Supplier Relationship Management -...

Let me know if it helps

Regards

Vinita