SAP Knowledge Base Article - Public

3258553 - SAP S/4HANA Key User Extensibility powered by Embedded Steampunk: How to debug Procurement Cloud BAdI’s

Symptom

You have a BADI implementation created in your system and you don´t get the expected result of your custom Logic code .

EG : Enhancement sport MM_PUR_S4_PR , MM_PUR_S4_PO

Environment


SAP S/4HANA Cloud Public Edition

Resolution

Before the introduction of Embedded Steampunk it was not possible within SAP S/4HANA Cloud to debug any Key User coding, e.g. Custom Logic.
This has changed now with the general availability of Embedded Steampunk, which adds a new powerful option to the In App extensibility portfolio of SAP S/4HANA Cloud. E.g. ABAP Development Tools (ADT) as a powerful development environment and with that also the possibility to debug custom code.

 
  • Now let us assume for a moment that you created a Cloud BAdI implementation via the Key User tool “Custom Logic” with the implementation name “YY1_PR_ITEM"( client 100) or "ZIC_PR_ITEM" (created in client 080, using ADT environment). This custom logic is executed whenever a Key User Custom Field is calculated.


    Within ADT we do now click on the “Open ABAP Development Object” button and as search term we enter the name of the Cloud BAdI implementation “YY1_PR_ITEM”.

    We are then navigated to our Key User BAdI implementation.

    1-There we can set the breakpoint exactly at that position we are interested in.

    When we now start the triggering application, e.g. in our SAP Fiori UI in the customizing tenant, the ADT debugger jumps in and stops at exactly the position we marked.

    2-You have the possibility to Trace the custom code with the new tool Abap Cross Trace in ADT 

     

    You can see  more details here

    We hope you enjoy with the guide.

    3- In case you need to debug a Workflow BADI on ADT you need a breakpoint for Technical User

    • Find the Function Module or Method related to your workflow.
    • Set the Breakpoint: Go to the source code view and click the left margin next to the line where you want the breakpoint.
    • Execute the Workflow to trigger the breakpoint and start debugging.

  • Setting ABAP Project-Specific Debug Settings | SAP Help Portal

    SAP Help Portal

     

    Debugging Enhancement Implementation | SAP Help Portal

    SAP Help Portal

 
 
 
 

See Also

Please also check the following tutorials where you will find relevant new possibilities on Embedded Steampunk

Create a Custom RAP Business Object to Trigger Purchase Requisitions API | Tutorials for SAP Developers

Implement a Business Add-in (`BAdI`) To Check a Purchase Requisition | Tutorials for SAP Developers

See also:

SAP S/4HANA Key User Extensibility powered by Embedded Steampunk: How to debug Key User Extensibility extensions (e.g. Cloud BAdI’s) in client 100 | SAP Blogs

Keywords

MM_PUR_S4_PO, SAP_WFRT , Debugging, ADT , workflow BADI  , KBA , MM-PUR-PO , Purchase Orders , MM-PUR-REQ , Purchase Requisitions , MM-FIO-PUR-PO , Fiori UI for Purchase Orders , MM-FIO-PUR-REL , Fiori UI for Purchasing Approval , MM-FIO-PUR-PO-WFL , Purchase Order Workflow , MM-FIO-PUR-PO-2CL , Fiori UI for Purchase Orders (Public Cloud) , MM-FIO-PUR-REL-2CL , Fiori UI for Purchasing Approval (Public Cloud) , MM-FIO-PUR-REQ-PRF , Manage Purchase Requisitions – Professional , Problem

Product

SAP S/4HANA Cloud Public Edition all versions

Attachments

Pasted image.png
Pasted image.png
Pasted image.png
Pasted image.png
Pasted image.png
Pasted image.png
Pasted image.png
Pasted image.png
Pasted image.png
Pasted image.png
Pasted image.png
Pasted image.png