SAP MATERIAL_SELECTION Function Module for NOTRANSL: Auswahl der Selektionsmerkmale zum Materialvorschlag
MATERIAL_SELECTION is a standard material selection 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: Auswahl der Selektionsmerkmale zum Materialvorschlag 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 material selection FM, simply by entering the name MATERIAL_SELECTION into the relevant SAP transaction such as SE37 or SE38.
Function Group: WLYP
Program Name: SAPLWLYP
Main Program:
Appliation area: W
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MATERIAL_SELECTION 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 'MATERIAL_SELECTION'"NOTRANSL: Auswahl der Selektionsmerkmale zum Materialvorschlag.
EXPORTING
* PI_AKTNR = "DE-EN-LANG-SWITCH-NO-TRANSLATION
IMPORTING
PE_MATKL = "DE-EN-LANG-SWITCH-NO-TRANSLATION
PE_LAYGR = "Layout Module
PE_SORT = "Assortment
PE_CLINT = "DE-EN-LANG-SWITCH-NO-TRANSLATION
PE_AKTNR = "Promotion
IMPORTING Parameters details for MATERIAL_SELECTION
PI_AKTNR - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: WAKH-AKTNROptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for MATERIAL_SELECTION
PE_MATKL - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: T023-MATKLOptional: No
Call by Reference: No ( called with pass by value option)
PE_LAYGR - Layout Module
Data type: TWML-LAYGROptional: No
Call by Reference: No ( called with pass by value option)
PE_SORT - Assortment
Data type: WSOP-SKOPFOptional: No
Call by Reference: No ( called with pass by value option)
PE_CLINT - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: KLAH-CLINTOptional: No
Call by Reference: No ( called with pass by value option)
PE_AKTNR - Promotion
Data type: WAKH-AKTNROptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MATERIAL_SELECTION 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_pe_matkl | TYPE T023-MATKL, " | |||
| lv_pi_aktnr | TYPE WAKH-AKTNR, " | |||
| lv_pe_laygr | TYPE TWML-LAYGR, " | |||
| lv_pe_sort | TYPE WSOP-SKOPF, " | |||
| lv_pe_clint | TYPE KLAH-CLINT, " | |||
| lv_pe_aktnr | TYPE WAKH-AKTNR. " |
|   CALL FUNCTION 'MATERIAL_SELECTION' "NOTRANSL: Auswahl der Selektionsmerkmale zum Materialvorschlag |
| EXPORTING | ||
| PI_AKTNR | = lv_pi_aktnr | |
| IMPORTING | ||
| PE_MATKL | = lv_pe_matkl | |
| PE_LAYGR | = lv_pe_laygr | |
| PE_SORT | = lv_pe_sort | |
| PE_CLINT | = lv_pe_clint | |
| PE_AKTNR | = lv_pe_aktnr | |
| . " MATERIAL_SELECTION | ||
ABAP code using 7.40 inline data declarations to call FM MATERIAL_SELECTION
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 MATKL FROM T023 INTO @DATA(ld_pe_matkl). | ||||
| "SELECT single AKTNR FROM WAKH INTO @DATA(ld_pi_aktnr). | ||||
| "SELECT single LAYGR FROM TWML INTO @DATA(ld_pe_laygr). | ||||
| "SELECT single SKOPF FROM WSOP INTO @DATA(ld_pe_sort). | ||||
| "SELECT single CLINT FROM KLAH INTO @DATA(ld_pe_clint). | ||||
| "SELECT single AKTNR FROM WAKH INTO @DATA(ld_pe_aktnr). | ||||
Search for further information about these or an SAP related objects