Ansicht
Dokumentation

/SAPAPO/SOS_FIND - Supply Source Determination

/SAPAPO/SOS_FIND - Supply Source Determination

CL_GUI_FRONTEND_SERVICES - Frontend Services   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

Source Determination via Function Module /SAPAPO/SOS_FIND

Function module /SAPAPO/SOS_FIND enables you to select valid sources of supply. The module should always be used if:

  • Sources are sought for a certain location product (individual selection), or
  • Source determination is to be carried out interactively (in dialog with the user)

For the mass selection of sources, you should use the source determination module /SAPAPO/SOS_FIND_ARRAY.

To read the source data for a known source of supply, you should use function module /SAPAPO/SOS_GET.

Important call parameters:

Mandatory parameters:

  • PI_MODEL,, ,,Model name in Supply Chain Network
  • PI_MATID ,,,,Internal number (UID) for product
  • PI_MODE ,,,,Determination mode:
  • PI_LOCTO ,,,,Internal number (UID) of dest. location or
  • PI_LOCFR ,,,,Internal number (UID) of source location

Optional parameters (excerpt)

  • PI_APPLI_FLG Calling application (Caution: if the source determination process is called from within SNP or CTM, the call parameter must be provided).
  • PI_DIALOG
  • X - Determination called in dialog

  • ' ' - Determination called in background (default setting)

  • PI_BUFFER_FLG (Further information on buffer flag - see parameter description)
  • X - Buffered source determination call (default setting)

  • ' ' - Read buffer not used (selection of source of supply data from database)

Course of the source determination process

After all sources of supply have been selected on the basis of the desired call parameters in the determination process, they are checked for validity according to their category. In this way, for example, in source determination (PI_MODE = 1), sources for inactive external procurement relationships or inactive PPMs are filtered out.

After all valid sources have been determined, they are sorted (the 'best' source appears in 'first place'):

Sorting in source determination (PI_MODE = '1')

  • Quota arrangement

  • Procurement priority

  • Costs (procurement costs + transportation costs)

  • First in-house production, then external procurement

Sorting in destination location determination (PI_MODE = '2')

  • Transportation costs

  • Duration of transportation

  • Quota arrangement

Return parameters:,,,,

  • PTO_SOURCES_TAB:Return of table of valid sources to the calling application, sorted according to the above sort criteria. The following are determined for each valid source:
  • Quota arrangement data (if available)

  • Means of transport data (if available)

  • Source-specific times (GI processing time, duration of transportation, GR processing time, planned delivery time)

  • Total cost in the event of procurement from this source

  • PTO_SOURCES_TAB_INVALID: Return of table of all invalid sources to calling application
  • PTO_SOURCES_TAB_ALL:,,Return table is filled only if the determination process was called in dialog mode. Return of all valid sources (those sources that were not selected by the user are also returned).
  • PTO_ERROR_MSG_TAB:Return of all errors that arose in the selection of sources documentation.

Example

Notes

Further information





Parameters

ET_LOC_BLOCK_STATUS
PI_ACCID
PI_AGGTPL_FLG
PI_ALWAYS
PI_APPLI_FLG
PI_APPLOG
PI_APRD_LOCPROD_ONLY
PI_BESKZ
PI_BUFFER_FLG
PI_BUFFER_REFRESH
PI_BUFFER_REFRESH_LANE_AFTER
PI_BZQID
PI_BZQ_INT
PI_CHANGE_MODE
PI_CONFIGURATION
PI_CONSI
PI_CURTO_MODE
PI_DIALOG
PI_DTLTPL_FLG
PI_IGNORE_PLAN_EXPL
PI_IH_HLEVEL
PI_IH_RELID
PI_INFO_ONLY
PI_KEEPLOG
PI_LOCFR
PI_LOCPROD_VALID_ONLY
PI_LOCTO
PI_MATID
PI_MAXLS
PI_MINLS
PI_MODE
PI_MODEL
PI_NOUNITCONV_FLG
PI_NO_APO_SA
PI_NO_CONFIG
PI_NO_CONTRACT
PI_NO_DEFAULT
PI_NO_INFREC
PI_NO_PROCTYPECHECK
PI_NO_QTQZ
PI_NO_QUOTA
PI_NO_SCHEDAGR
PI_NO_SUBCO
PI_NO_VALIDITY_CHECKS
PI_ONLY_MOST_REL_MOT
PI_PLANID
PI_PLAN_USAGE
PI_PR_HLEVEL
PI_PR_RELID
PI_RECURSION
PI_SHOW_STRAT_PROF
PI_SHOW_TABLES
PI_SIMID
PI_SIMSESSION
PI_SNP_DELETION
PI_SOS_AND_QUOTA
PI_SPRKZ_FLD
PI_SUBCO
PI_TRPID
PI_TRPTYPE_FLD
PI_TTYPE
PI_TTYPE_VALID_ONLY
PI_VALFR
PI_VALTO
PI_VDREL_LOCFR
PI_VERID
PO_CONFIGURATION
PO_PV
PO_SOURCES_VALID
PTI_TRPID
PTO_ERROR_MSG_TAB
PTO_QUOTAS_SHOW
PTO_SOURCES_QUOTA
PTO_SOURCES_SHOW
PTO_SOURCES_TAB
PTO_SOURCES_TAB_ALL
PTO_SOURCES_TAB_INVALID

Exceptions

INVALID_DATE
INVALID_QUANTITY
MISSING_LOCATION
MISSING_MODEL
USER_CANCELED
WRONG_SELECTION

Function Group

APO/SAPLMMPUR_SOS

RFUMSV00 - Advance Return for Tax on Sales/Purchases   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 7793 Date: 20240425 Time: 060937     sap01-206 ( 107 ms )