SAP CIF_MATERIAL_KEY_SELECTION Function Module for NOTRANSL: Ermitteln von Materialstamm-Keys zu gegebenen Range-Tabellen
CIF_MATERIAL_KEY_SELECTION is a standard cif 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 cif material key selection FM, simply by entering the name CIF_MATERIAL_KEY_SELECTION into the relevant SAP transaction such as SE37 or SE38.
Function Group: CSEL
Program Name: SAPLCSEL
Main Program: SAPLCSEL
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CIF_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 'CIF_MATERIAL_KEY_SELECTION'"NOTRANSL: Ermitteln von Materialstamm-Keys zu gegebenen Range-Tabellen.
EXPORTING
* READ_MARA_KEYS = ' ' "Indicates Whether the Corresponding Data Segment Is Read
* READ_MARC_KEYS = ' ' "Indicates Whether the Corresponding Data Segment Is Read
* READ_MARD_KEYS = ' ' "Indicates Whether the Corresponding Data Segment Is Read
* READ_MVKE_KEYS = ' ' "Indicates Whether the Corresponding Data Segment Is Read
TABLES
* IN_MATNR_RANGE = "Range for Material Number (MATNR)
* OUT_WERKS_LIST = "Help structure for mass access to material
* OUT_LGORT_LIST = "Transfer Structure for Prefetch when Reading Material
* OUT_VTLIN_LIST = "Help Structure for Mass Access to Table MVKE
IN_WERKS_LIST = "Help structure for mass access to material
* IN_WERKS_RANGE = "Range for Plant Number (WERKS)
* IN_LGORT_RANGE = "Range for Storage Location Number (LGORT)
* IN_VKORG_RANGE = "Range for Sales Organization Number (VKORG)
* IN_VTWEG_RANGE = "Range for Distribution Channel Number (VTWEG)
* IN_DISPO_RANGE = "Range for MRP Controller (MARC-DISPO)
* IN_DISMM_RANGE = "Range for MRP Type (MARC-DISMM)
* IN_ABCKZ_RANGE = "Range for ABC Indicator (MARC-MAABC)
* OUT_MATNR_LIST = "Structure: Material - Preliminary Step
IMPORTING Parameters details for CIF_MATERIAL_KEY_SELECTION
READ_MARA_KEYS - Indicates Whether the Corresponding Data Segment Is Read
Data type: SEL_FIELDS-READ_FLAGDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
READ_MARC_KEYS - Indicates Whether the Corresponding Data Segment Is Read
Data type: SEL_FIELDS-READ_FLAGDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
READ_MARD_KEYS - Indicates Whether the Corresponding Data Segment Is Read
Data type: SEL_FIELDS-READ_FLAGDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
READ_MVKE_KEYS - Indicates Whether the Corresponding Data Segment Is Read
Data type: SEL_FIELDS-READ_FLAGDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CIF_MATERIAL_KEY_SELECTION
IN_MATNR_RANGE - Range for Material Number (MATNR)
Data type: MAT_RANGEOptional: Yes
Call by Reference: No ( called with pass by value option)
OUT_WERKS_LIST - Help structure for mass access to material
Data type: PRE01Optional: Yes
Call by Reference: No ( called with pass by value option)
OUT_LGORT_LIST - Transfer Structure for Prefetch when Reading Material
Data type: PRE08Optional: Yes
Call by Reference: No ( called with pass by value option)
OUT_VTLIN_LIST - Help Structure for Mass Access to Table MVKE
Data type: PRE10Optional: Yes
Call by Reference: No ( called with pass by value option)
IN_WERKS_LIST - Help structure for mass access to material
Data type: PRE01Optional: No
Call by Reference: No ( called with pass by value option)
IN_WERKS_RANGE - Range for Plant Number (WERKS)
Data type: WRK_RANGEOptional: Yes
Call by Reference: No ( called with pass by value option)
IN_LGORT_RANGE - Range for Storage Location Number (LGORT)
Data type: LGO_RANGEOptional: Yes
Call by Reference: No ( called with pass by value option)
IN_VKORG_RANGE - Range for Sales Organization Number (VKORG)
Data type: VKO_RANGEOptional: Yes
Call by Reference: No ( called with pass by value option)
IN_VTWEG_RANGE - Range for Distribution Channel Number (VTWEG)
Data type: VTW_RANGEOptional: Yes
Call by Reference: No ( called with pass by value option)
IN_DISPO_RANGE - Range for MRP Controller (MARC-DISPO)
Data type: DISP_RANGEOptional: Yes
Call by Reference: No ( called with pass by value option)
IN_DISMM_RANGE - Range for MRP Type (MARC-DISMM)
Data type: DISM_RANGEOptional: Yes
Call by Reference: No ( called with pass by value option)
IN_ABCKZ_RANGE - Range for ABC Indicator (MARC-MAABC)
Data type: ABC_RANGEOptional: Yes
Call by Reference: No ( called with pass by value option)
OUT_MATNR_LIST - Structure: Material - Preliminary Step
Data type: PRE03Optional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CIF_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_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_in_werks_list | TYPE STANDARD TABLE OF PRE01, " | |||
| 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_dispo_range | TYPE STANDARD TABLE OF DISP_RANGE, " | |||
| lt_in_dismm_range | TYPE STANDARD TABLE OF DISM_RANGE, " | |||
| lt_in_abckz_range | TYPE STANDARD TABLE OF ABC_RANGE, " | |||
| lt_out_matnr_list | TYPE STANDARD TABLE OF PRE03. " |
|   CALL FUNCTION 'CIF_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 | |
| OUT_WERKS_LIST | = lt_out_werks_list | |
| OUT_LGORT_LIST | = lt_out_lgort_list | |
| OUT_VTLIN_LIST | = lt_out_vtlin_list | |
| IN_WERKS_LIST | = lt_in_werks_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_DISPO_RANGE | = lt_in_dispo_range | |
| IN_DISMM_RANGE | = lt_in_dismm_range | |
| IN_ABCKZ_RANGE | = lt_in_abckz_range | |
| OUT_MATNR_LIST | = lt_out_matnr_list | |
| . " CIF_MATERIAL_KEY_SELECTION | ||
ABAP code using 7.40 inline data declarations to call FM CIF_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