Page tree
Skip to end of metadata
Go to start of metadata

Purpose

This page was created to clarify the application logic that triggers the XML when a PO is created for Central Contract in ECC.

Overview

When an ECC PO is created for a Central Contract that was distributed from SRM system, ECC triggers an XML PurchaseOrderERPContractReleaseNotification_Out to SRM to update the Release Value of the SRM contract.
This Debugging Guide can help understanding how the XML is populated, and what is the logic behind it. This page can be useful for identifying the root cause of an undesired behavior of system.

Debugging Guide

To start the debugging, set a breakpoint in Include MM06EF0B_BUCHEN. When you save the PO, the breakpoint will stop.

In case it is a service PO, the relevant logic starts from here, where system gathers the service-related PO call off data:

FORM PREPARE_SRVEKAB_FOR_PO calls FM MS_GET_SRVEKAB_FOR_PO_SRV. In the FM system fills ET_SRVEKAB with the data of service lines and PO item.

From this point on, the same logic occurs for service and material POs.

System calls Method UPDATE_CC exporting the PO item data and the previously filled service data. Here check, if the PO data and service EKAB data is correct.

In this method system calls FM ME_UPDATE_AGREEMENT_CC in update task.

To continue the analysis, it is necessary to debug the scenario further in Update debugging. To do this, in the debugging session:

  1. Go to menu Settings → Change Debugger Profile/ Settings.
  2. Tick Update debugging.
  3. Click button Save Settings in the bottom left corner of the window next to the green checkmark.

  4. Press F8 to let the program run.

  5. The debugging session window will be closed for a couple of seconds and then a new debugging window should appear. 

  6. Press button F9.

  7. In the popup window, choose tab Function Module and fill ME_UPDATE_AGREEMENT_CC.

  8. Press Enter.

  9. Press F8.

The breakpoint should stop in FM ME_UPDATE_AGREEMENT_CC. Here we can continue the debugging.

System loops at PO items and moves the data into structure NEKPO.

Then it fills the item data into EKAB structure using the previously filled NEKPO. After this logic, check if EKAB has correct values.

Afterwards system fills SRM_CONTRACT_ID, SRM_CONTRACT_ITM and the previously filled structure EKAB into LS_RELINFO_ESOA. If the SRM-related fields are filled (meaning the Contract was replicated from SRM system), system appends the data into table LT_RELINFO_ESOA.

If table LT_RELINFO_ESOA is filled, system calls the PROCESS_OUT Method.

In this Method, system maps the EKAB data into XML structure. Check if the importing parameter LS_RESPONSE has correct values.

Then system calls BAdI PUR_SE_PURORDPCONTRTRELNO_ASYN (Method OUTBOUND_PROCESSING), which makes it possible to modify the standard mapping by custom logic. Verify, if the logic doesn't causes any unexpected change in LS_RESPONSE.

Finally, system triggers the XML using the previously filled LS_RESPONSE.