SAP RETAIL_SEARCH_SOURCE_OF_SUPPLY Function Module for Retail Source of Supply Determination With and Without Reference Plants









RETAIL_SEARCH_SOURCE_OF_SUPPLY is a standard retail search source of supply SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Retail Source of Supply Determination With and Without Reference Plants processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for retail search source of supply FM, simply by entering the name RETAIL_SEARCH_SOURCE_OF_SUPPLY into the relevant SAP transaction such as SE37 or SE38.

Function Group: WSOS_REF
Program Name: SAPLWSOS_REF
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function RETAIL_SEARCH_SOURCE_OF_SUPPLY pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'RETAIL_SEARCH_SOURCE_OF_SUPPLY'"Retail Source of Supply Determination With and Without Reference Plants
EXPORTING
* I_BANFN = ' ' "Purchase requisition number
* I_BNFPO = 0 "Item number of purchase requisition
* I_NO_MATERIAL_READ = "Generic Type
* I_IA_FLAG = "Generic Type

IMPORTING
NO_SOURCE_FOUND = "Generic Type
UNIQUE_SOURCE_FOUND = "Generic Type
CH_READY = "Generic Type

CHANGING
CH_S_COMIM = "Import Structure for Source of Supply Check and Search
CH_S_COMEX = "Exporting Structure for Source of Supply Check

TABLES
* CH_T_SRC_DETERM = "Sources of Supply
* E_T_LEINA = "Purchasing Info Record: General Data
* E_T_LEINE = "Purchasing Info Record: Purchasing Organization Data

EXCEPTIONS
ERROR = 1
.



IMPORTING Parameters details for RETAIL_SEARCH_SOURCE_OF_SUPPLY

I_BANFN - Purchase requisition number

Data type: EBAN-BANFN
Default: SPACE
Optional: Yes
Call by Reference: Yes

I_BNFPO - Item number of purchase requisition

Data type: EBAN-BNFPO
Optional: Yes
Call by Reference: Yes

I_NO_MATERIAL_READ - Generic Type

Data type: C
Optional: Yes
Call by Reference: Yes

I_IA_FLAG - Generic Type

Data type: C
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for RETAIL_SEARCH_SOURCE_OF_SUPPLY

NO_SOURCE_FOUND - Generic Type

Data type: C
Optional: No
Call by Reference: Yes

UNIQUE_SOURCE_FOUND - Generic Type

Data type: C
Optional: No
Call by Reference: Yes

CH_READY - Generic Type

Data type: C
Optional: No
Call by Reference: Yes

CHANGING Parameters details for RETAIL_SEARCH_SOURCE_OF_SUPPLY

CH_S_COMIM - Import Structure for Source of Supply Check and Search

Data type: BQPIM
Optional: No
Call by Reference: Yes

CH_S_COMEX - Exporting Structure for Source of Supply Check

Data type: BQPEX
Optional: No
Call by Reference: Yes

TABLES Parameters details for RETAIL_SEARCH_SOURCE_OF_SUPPLY

CH_T_SRC_DETERM - Sources of Supply

Data type: SRC_DETERM
Optional: Yes
Call by Reference: Yes

E_T_LEINA - Purchasing Info Record: General Data

Data type: EINA
Optional: Yes
Call by Reference: Yes

E_T_LEINE - Purchasing Info Record: Purchasing Organization Data

Data type: EINE
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

ERROR - Error

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for RETAIL_SEARCH_SOURCE_OF_SUPPLY Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_error  TYPE STRING, "   
lv_i_banfn  TYPE EBAN-BANFN, "   SPACE
lv_ch_s_comim  TYPE BQPIM, "   
lt_ch_t_src_determ  TYPE STANDARD TABLE OF SRC_DETERM, "   
lv_no_source_found  TYPE C, "   
lv_i_bnfpo  TYPE EBAN-BNFPO, "   0
lt_e_t_leina  TYPE STANDARD TABLE OF EINA, "   
lv_ch_s_comex  TYPE BQPEX, "   
lv_unique_source_found  TYPE C, "   
lv_ch_ready  TYPE C, "   
lt_e_t_leine  TYPE STANDARD TABLE OF EINE, "   
lv_i_no_material_read  TYPE C, "   
lv_i_ia_flag  TYPE C. "   

  CALL FUNCTION 'RETAIL_SEARCH_SOURCE_OF_SUPPLY'  "Retail Source of Supply Determination With and Without Reference Plants
    EXPORTING
         I_BANFN = lv_i_banfn
         I_BNFPO = lv_i_bnfpo
         I_NO_MATERIAL_READ = lv_i_no_material_read
         I_IA_FLAG = lv_i_ia_flag
    IMPORTING
         NO_SOURCE_FOUND = lv_no_source_found
         UNIQUE_SOURCE_FOUND = lv_unique_source_found
         CH_READY = lv_ch_ready
    CHANGING
         CH_S_COMIM = lv_ch_s_comim
         CH_S_COMEX = lv_ch_s_comex
    TABLES
         CH_T_SRC_DETERM = lt_ch_t_src_determ
         E_T_LEINA = lt_e_t_leina
         E_T_LEINE = lt_e_t_leine
    EXCEPTIONS
        ERROR = 1
. " RETAIL_SEARCH_SOURCE_OF_SUPPLY




ABAP code using 7.40 inline data declarations to call FM RETAIL_SEARCH_SOURCE_OF_SUPPLY

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
"SELECT single BANFN FROM EBAN INTO @DATA(ld_i_banfn).
DATA(ld_i_banfn) = ' '.
 
 
 
 
"SELECT single BNFPO FROM EBAN INTO @DATA(ld_i_bnfpo).
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!