SAP DISTRIBUTION_CENTERS_FIND Function Module for NOTRANSL: Lesen der Lieferwerke zu den Warengruppen einer Filiale
DISTRIBUTION_CENTERS_FIND is a standard distribution centers find SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Lesen der Lieferwerke zu den Warengruppen einer Filiale 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 distribution centers find FM, simply by entering the name DISTRIBUTION_CENTERS_FIND into the relevant SAP transaction such as SE37 or SE38.
Function Group: WBBR
Program Name: SAPLWBBR
Main Program: SAPLWBBR
Appliation area: W
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function DISTRIBUTION_CENTERS_FIND 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 'DISTRIBUTION_CENTERS_FIND'"NOTRANSL: Lesen der Lieferwerke zu den Warengruppen einer Filiale.
EXPORTING
PI_LOCNR = "Customer Number
* PI_DATAB = SY-DATUM "Date From
* PI_DATBI = SY-DATUM "Date To
* PI_NO_DC_ON_CHG = ' ' "DE-EN-LANG-SWITCH-NO-TRANSLATION
TABLES
PI_T_ARTNR = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* PI_T_LIFNR_CHO = "DE-EN-LANG-SWITCH-NO-TRANSLATION
PE_T_ARTNR = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* PE_T_WRF3 = "DE-EN-LANG-SWITCH-NO-TRANSLATION
EXCEPTIONS
NO_RECORD_FOUND = 1
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLWBBR_001 Sort Modification for Materials in the Assortment List
IMPORTING Parameters details for DISTRIBUTION_CENTERS_FIND
PI_LOCNR - Customer Number
Data type: WRF3-LOCNROptional: No
Call by Reference: No ( called with pass by value option)
PI_DATAB - Date From
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
PI_DATBI - Date To
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
PI_NO_DC_ON_CHG - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: WDL_FLAG-XFELDDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for DISTRIBUTION_CENTERS_FIND
PI_T_ARTNR - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: WDL_ALWOptional: No
Call by Reference: No ( called with pass by value option)
PI_T_LIFNR_CHO - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: WBB_DISCOptional: Yes
Call by Reference: No ( called with pass by value option)
PE_T_ARTNR - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: WDL_ALWOptional: No
Call by Reference: No ( called with pass by value option)
PE_T_WRF3 - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: WRF3Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_RECORD_FOUND - No Entry Available
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for DISTRIBUTION_CENTERS_FIND 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_pi_locnr | TYPE WRF3-LOCNR, " | |||
| lt_pi_t_artnr | TYPE STANDARD TABLE OF WDL_ALW, " | |||
| lv_no_record_found | TYPE WDL_ALW, " | |||
| lv_pi_datab | TYPE SY-DATUM, " SY-DATUM | |||
| lt_pi_t_lifnr_cho | TYPE STANDARD TABLE OF WBB_DISC, " | |||
| lv_pi_datbi | TYPE SY-DATUM, " SY-DATUM | |||
| lt_pe_t_artnr | TYPE STANDARD TABLE OF WDL_ALW, " | |||
| lt_pe_t_wrf3 | TYPE STANDARD TABLE OF WRF3, " | |||
| lv_pi_no_dc_on_chg | TYPE WDL_FLAG-XFELD. " ' ' |
|   CALL FUNCTION 'DISTRIBUTION_CENTERS_FIND' "NOTRANSL: Lesen der Lieferwerke zu den Warengruppen einer Filiale |
| EXPORTING | ||
| PI_LOCNR | = lv_pi_locnr | |
| PI_DATAB | = lv_pi_datab | |
| PI_DATBI | = lv_pi_datbi | |
| PI_NO_DC_ON_CHG | = lv_pi_no_dc_on_chg | |
| TABLES | ||
| PI_T_ARTNR | = lt_pi_t_artnr | |
| PI_T_LIFNR_CHO | = lt_pi_t_lifnr_cho | |
| PE_T_ARTNR | = lt_pe_t_artnr | |
| PE_T_WRF3 | = lt_pe_t_wrf3 | |
| EXCEPTIONS | ||
| NO_RECORD_FOUND = 1 | ||
| . " DISTRIBUTION_CENTERS_FIND | ||
ABAP code using 7.40 inline data declarations to call FM DISTRIBUTION_CENTERS_FIND
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 LOCNR FROM WRF3 INTO @DATA(ld_pi_locnr). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_pi_datab). | ||||
| DATA(ld_pi_datab) | = SY-DATUM. | |||
| "SELECT single DATUM FROM SY INTO @DATA(ld_pi_datbi). | ||||
| DATA(ld_pi_datbi) | = SY-DATUM. | |||
| "SELECT single XFELD FROM WDL_FLAG INTO @DATA(ld_pi_no_dc_on_chg). | ||||
| DATA(ld_pi_no_dc_on_chg) | = ' '. | |||
Search for further information about these or an SAP related objects