This site provides you with information about Source of Supply. The topics covered are the maintenance, relations to other business objects and determination of SoS.
Source of Supply is a business object generally related to Transportation Lanes and External Procurement Relationships.
How to maintain Source of Supply in SCM System:
- The main transactions are:
- Maintenance using the Cross Interface Function (CIF):
Source of Supply search/selection during APO application runs - troubleshooting help:
/Please note that the below guide introduces a general scenario and may not be applicable for all special cases. However it can provide information where to start debugging in general./
The most frequent problems regarding source of supply's are when the required source is not returned/not found or not handled as expected during an SCM application run.
The function modules that are used for finding/selection for Source of Supplies are:
The function module for SoS validation is:
The customer may face situations that the SoS is not selected. Although in the UI eg. in T-code /SAPAPO/SCC_TL1 (Transportation Lanes) or at the T-code /SAPAPO/PWBSRC1 (External Procurement Relationships) the Source of Supply is clearly visible for the -From and -To location and the chosen Product. The Valid-from and Valid-to dates are inside the provided range. The Source's activity indicator is green. Therefore seemingly all the conditions are fulfilled in order to select the SoS during the application.
The above basic conditions are being checked by /SAPAPO/SOS_FIND and /SAPAPO/SOS_FIND_ARRAY function modules.
> The variables need to be tracked here. These should be filled in the two FM's if the selection criteria is correct:
Now both FM's are able to call function '/SAPAPO/SOS_VALIDITY_CHECKS' ... IF pi_no_validity_checks IS INITIAL.
> The answer to what happened in the function module is laying in the output tables. Typical case is like:
LT_SOURCES >>> However you have entries in the table ...
LT_SOURCES_VALID >>> ... there are NO entries in the valid table ...
LT_SOURCES_INVALID >>> ... the entries are in this table ... invalidated.
How to debug the Function Module '/SAPAPO/SOS_VALIDITY_CHECKS' the most effectively?
Track the variable:
and keep jumping from the beginning through the FM /SAPAPO/SOS_VALIDITY_CHECKS (with F6 button). The point where L_DELETE receives an ''X'' value is where the SoS is filtered out. Read the description of the code part and evaluate which parameter caused the marking.
The L_DELETE variable will give its ''X'' value to L_ADD_INVALID variable, which will make PTO_SOURCES_INVALID filled with the invalid source.
After stepping out of the FM to one level back to the /SAPAPO/SOS_FIND or /SAPAPO/SOS_FIND_ARRAY: the variable LT_SOURCES_INVALID gets filled.
There are several points where this Validity Check can fail, it can happen due to eg. a /SAPAPO/TPSRC (External Procurement Relationship) a /SAPAPO/TRPROD (Product-specific T-lane) related entry, but it can happen due to a /SAPAPO/LOC (Location Master) table entry as well. Please note that there are several flags that are not even visible in /SAPAPO/SCC_TL1 transaction where you would expect the SoS entry, but they are only visible in ECC side and in the database tables in APO.
PDS as a Source of Supply:
In case of quota arrangements, Product Data Structures can be defined as Source of Supply. In the terms of database table relations, the PDS is connected to the /SAPAPO/TRPROD table through the field TRPID, which is referred in the /SAPAPO/CURTOWUL table for PDS-s.
Related SAP Notes, KBAs