SAP MATERIAL_KEY_SELECTION Function Module for NOTRANSL: Ermitteln von Materialstamm-Keys zu gegebenen Range-Tabellen









MATERIAL_KEY_SELECTION is a standard material key 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: Ermitteln von Materialstamm-Keys zu gegebenen Range-Tabellen 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 key selection FM, simply by entering the name MATERIAL_KEY_SELECTION into the relevant SAP transaction such as SE37 or SE38.

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



Function MATERIAL_KEY_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_KEY_SELECTION'"NOTRANSL: Ermitteln von Materialstamm-Keys zu gegebenen Range-Tabellen
EXPORTING
* READ_MARA_KEYS = ' ' "
* READ_MARC_KEYS = ' ' "
* READ_MARD_KEYS = ' ' "
* READ_MVKE_KEYS = ' ' "

TABLES
* IN_MATNR_RANGE = "
* IN_ABCKZ_RANGE = "
* OUT_MATNR_LIST = "
* OUT_WERKS_LIST = "
* OUT_LGORT_LIST = "
* OUT_VTLIN_LIST = "
* OUT_XCHAR_LIST = "Selection Structure for MARC (MATNR, WERKS, XCHAR)
* IN_WERKS_RANGE = "
* IN_LGORT_RANGE = "
* IN_VKORG_RANGE = "
* IN_VTWEG_RANGE = "
* IN_MTART_RANGE = "
* IN_MMSTA_RANGE = "
* IN_DISPO_RANGE = "
* IN_DISMM_RANGE = "
.



IMPORTING Parameters details for MATERIAL_KEY_SELECTION

READ_MARA_KEYS -

Data type: SEL_FIELDS-READ_FLAG
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

READ_MARC_KEYS -

Data type: SEL_FIELDS-READ_FLAG
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

READ_MARD_KEYS -

Data type: SEL_FIELDS-READ_FLAG
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

READ_MVKE_KEYS -

Data type: SEL_FIELDS-READ_FLAG
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for MATERIAL_KEY_SELECTION

IN_MATNR_RANGE -

Data type: MAT_RANGE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IN_ABCKZ_RANGE -

Data type: ABC_RANGE
Optional: Yes
Call by Reference: No ( called with pass by value option)

OUT_MATNR_LIST -

Data type: PRE03
Optional: Yes
Call by Reference: No ( called with pass by value option)

OUT_WERKS_LIST -

Data type: PRE01
Optional: Yes
Call by Reference: No ( called with pass by value option)

OUT_LGORT_LIST -

Data type: PRE08
Optional: Yes
Call by Reference: No ( called with pass by value option)

OUT_VTLIN_LIST -

Data type: PRE10
Optional: Yes
Call by Reference: No ( called with pass by value option)

OUT_XCHAR_LIST - Selection Structure for MARC (MATNR, WERKS, XCHAR)

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

IN_WERKS_RANGE -

Data type: WRK_RANGE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IN_LGORT_RANGE -

Data type: LGO_RANGE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IN_VKORG_RANGE -

Data type: VKO_RANGE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IN_VTWEG_RANGE -

Data type: VTW_RANGE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IN_MTART_RANGE -

Data type: MART_RANGE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IN_MMSTA_RANGE -

Data type: MSTA_RANGE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IN_DISPO_RANGE -

Data type: DISP_RANGE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IN_DISMM_RANGE -

Data type: DISM_RANGE
Optional: Yes
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for MATERIAL_KEY_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:
lt_in_matnr_range  TYPE STANDARD TABLE OF MAT_RANGE, "   
lv_read_mara_keys  TYPE SEL_FIELDS-READ_FLAG, "   ' '
lt_in_abckz_range  TYPE STANDARD TABLE OF ABC_RANGE, "   
lt_out_matnr_list  TYPE STANDARD TABLE OF PRE03, "   
lt_out_werks_list  TYPE STANDARD TABLE OF PRE01, "   
lt_out_lgort_list  TYPE STANDARD TABLE OF PRE08, "   
lt_out_vtlin_list  TYPE STANDARD TABLE OF PRE10, "   
lt_out_xchar_list  TYPE STANDARD TABLE OF CFMARCSL, "   
lt_in_werks_range  TYPE STANDARD TABLE OF WRK_RANGE, "   
lv_read_marc_keys  TYPE SEL_FIELDS-READ_FLAG, "   ' '
lt_in_lgort_range  TYPE STANDARD TABLE OF LGO_RANGE, "   
lv_read_mard_keys  TYPE SEL_FIELDS-READ_FLAG, "   ' '
lt_in_vkorg_range  TYPE STANDARD TABLE OF VKO_RANGE, "   
lv_read_mvke_keys  TYPE SEL_FIELDS-READ_FLAG, "   ' '
lt_in_vtweg_range  TYPE STANDARD TABLE OF VTW_RANGE, "   
lt_in_mtart_range  TYPE STANDARD TABLE OF MART_RANGE, "   
lt_in_mmsta_range  TYPE STANDARD TABLE OF MSTA_RANGE, "   
lt_in_dispo_range  TYPE STANDARD TABLE OF DISP_RANGE, "   
lt_in_dismm_range  TYPE STANDARD TABLE OF DISM_RANGE. "   

  CALL FUNCTION 'MATERIAL_KEY_SELECTION'  "NOTRANSL: Ermitteln von Materialstamm-Keys zu gegebenen Range-Tabellen
    EXPORTING
         READ_MARA_KEYS = lv_read_mara_keys
         READ_MARC_KEYS = lv_read_marc_keys
         READ_MARD_KEYS = lv_read_mard_keys
         READ_MVKE_KEYS = lv_read_mvke_keys
    TABLES
         IN_MATNR_RANGE = lt_in_matnr_range
         IN_ABCKZ_RANGE = lt_in_abckz_range
         OUT_MATNR_LIST = lt_out_matnr_list
         OUT_WERKS_LIST = lt_out_werks_list
         OUT_LGORT_LIST = lt_out_lgort_list
         OUT_VTLIN_LIST = lt_out_vtlin_list
         OUT_XCHAR_LIST = lt_out_xchar_list
         IN_WERKS_RANGE = lt_in_werks_range
         IN_LGORT_RANGE = lt_in_lgort_range
         IN_VKORG_RANGE = lt_in_vkorg_range
         IN_VTWEG_RANGE = lt_in_vtweg_range
         IN_MTART_RANGE = lt_in_mtart_range
         IN_MMSTA_RANGE = lt_in_mmsta_range
         IN_DISPO_RANGE = lt_in_dispo_range
         IN_DISMM_RANGE = lt_in_dismm_range
. " MATERIAL_KEY_SELECTION




ABAP code using 7.40 inline data declarations to call FM MATERIAL_KEY_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 READ_FLAG FROM SEL_FIELDS INTO @DATA(ld_read_mara_keys).
DATA(ld_read_mara_keys) = ' '.
 
 
 
 
 
 
 
 
"SELECT single READ_FLAG FROM SEL_FIELDS INTO @DATA(ld_read_marc_keys).
DATA(ld_read_marc_keys) = ' '.
 
 
"SELECT single READ_FLAG FROM SEL_FIELDS INTO @DATA(ld_read_mard_keys).
DATA(ld_read_mard_keys) = ' '.
 
 
"SELECT single READ_FLAG FROM SEL_FIELDS INTO @DATA(ld_read_mvke_keys).
DATA(ld_read_mvke_keys) = ' '.
 
 
 
 
 
 


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!