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

Purpose

The purpose of this page is to provide users with a guide on how the source of supply assignment and search process runs from the Manage or Process Purchase Requisitions Centrally application.

Overview

In case the central and connected system are separate systems, the central system initiates an OData call to the connected system. 

Debugging

Set an external breakpoint in Method GET_SOURCE_OF_SUPPLY of class CL_MMPUR_CENTRL_PURCH_DRIVER for the end user.

When the user presses the “Assign SOS” button, the breakpoint will stop.

The first call is a metadata call, where the central system establishes the connection and token with the connected system.

After this with the second call the logic determines if the scenario is local or external. 


In case the scenario is external the logic calls the connected from the Method IF_MMPUR_CAT_DATA_SRV_HUB~TRIGGER_SERVICE class: CL_MMPUR_HUB_SRV.


From here the central initiates a Gateway service call for the service MMPUR_REQ_SOURCEOFSUPPLY_SRV/SourceOfSupplySet.

Set an external breakpoint to the SM59 user of the connected system, to stop the process in the Method: SOURCEOFSUPPLYSE_GET_ENTITYSET class: CL_MMPUR_REQ_SOURCEOFS_DPC_EXT.

Or in the standard purchasing function module ME_SEARCH_SOURCE_OF_SUPPLY.


The logic maps the correct material number and unit of measure here for the vendor search.

The response is collected in the central system in the method: IF_MMPUR_CAT_DATA_SRV_HUB~PARSE_RESPONSE_TO_TABLE   class: CL_MMPUR_HUB_SRV.

A good way to analyze any defect is to check the Purchase Requisition in ME52N and press the Assign Source of Supply button on the Source of Supply tab of the Requisition, to trigger the function module: ME_SEARCH_SOURCE_OF_SUPPLY locally.

This will show the difference between the central and local call.

If a source is returned, then this can be assigned to the Purchase Requisition.

Place a breakpoint in the Method: ASSIGN_SOS in class: CL_MMPUR_CENTRL_PURCH_DRIVER.

Here the central system calls the connected with the chosen source with the OData Call: MMPUR_REQ_SOURCEOFSUPPLY_SRV/PurchaseRequisitionSourceOfSupplySet.

In the connected system the Purchase Requisition is updated with the BAPI_PR_CREATE, which is a good place for an external breakpoint in this scenario. 

Further breakpoints can be set in the connected system in the Method: PROCESS in class: CL_MMPUR_SOS_ASSIGN_PR_CENTRAL.

Because this change uses the BAPI_PR_CREATE, the FBGENDAT test data creation can also be useful here.

Related Content

Related Documents

Central Procurement

Related SAP Notes/KBAs

SAP Note: 2810175 - Central Purchasing: Unable to assign source of supply

  • No labels