SAP MY_MATERIAL_EXCLUDE_CHECK Function Module for
MY_MATERIAL_EXCLUDE_CHECK is a standard my material exclude check SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 my material exclude check FM, simply by entering the name MY_MATERIAL_EXCLUDE_CHECK into the relevant SAP transaction such as SE37 or SE38.
Function Group: NIWE
Program Name: SAPLNIWE
Main Program: SAPLNIWE
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MY_MATERIAL_EXCLUDE_CHECK 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 'MY_MATERIAL_EXCLUDE_CHECK'".
EXPORTING
I_BWKEY = "
I_MATNR = "
* I_MTART = "
* I_XLIFO = "
* I_MYPOL = "
I_NIWEX = "
I_BUKRS = "Company Code
* IS_NIWE = "Transfer Structure for Lowest Value Determination
IMPORTING
E_SUBRC = "
E_CUSTX = "
CHANGING
C_ERSDA = "
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_SAPLNIWE_001
EXIT_SAPLNIWE_002
EXIT_SAPLNIWE_003
EXIT_SAPLNIWE_004
EXIT_SAPLNIWE_005
IMPORTING Parameters details for MY_MATERIAL_EXCLUDE_CHECK
I_BWKEY -
Data type: MBEW-BWKEYOptional: No
Call by Reference: No ( called with pass by value option)
I_MATNR -
Data type: MBEW-MATNROptional: No
Call by Reference: No ( called with pass by value option)
I_MTART -
Data type: MARA-MTARTOptional: Yes
Call by Reference: No ( called with pass by value option)
I_XLIFO -
Data type: MBEW-XLIFOOptional: Yes
Call by Reference: No ( called with pass by value option)
I_MYPOL -
Data type: MBEW-MYPOLOptional: Yes
Call by Reference: No ( called with pass by value option)
I_NIWEX -
Data type: SNIWE-NIWEXOptional: No
Call by Reference: No ( called with pass by value option)
I_BUKRS - Company Code
Data type: BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
IS_NIWE - Transfer Structure for Lowest Value Determination
Data type: SNIWEOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MY_MATERIAL_EXCLUDE_CHECK
E_SUBRC -
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
E_CUSTX -
Data type: SNIWE-CUSTXOptional: No
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for MY_MATERIAL_EXCLUDE_CHECK
C_ERSDA -
Data type: MARA-ERSDAOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MY_MATERIAL_EXCLUDE_CHECK 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_c_ersda | TYPE MARA-ERSDA, " | |||
| lv_e_subrc | TYPE SY-SUBRC, " | |||
| lv_i_bwkey | TYPE MBEW-BWKEY, " | |||
| lv_e_custx | TYPE SNIWE-CUSTX, " | |||
| lv_i_matnr | TYPE MBEW-MATNR, " | |||
| lv_i_mtart | TYPE MARA-MTART, " | |||
| lv_i_xlifo | TYPE MBEW-XLIFO, " | |||
| lv_i_mypol | TYPE MBEW-MYPOL, " | |||
| lv_i_niwex | TYPE SNIWE-NIWEX, " | |||
| lv_i_bukrs | TYPE BUKRS, " | |||
| lv_is_niwe | TYPE SNIWE. " |
|   CALL FUNCTION 'MY_MATERIAL_EXCLUDE_CHECK' " |
| EXPORTING | ||
| I_BWKEY | = lv_i_bwkey | |
| I_MATNR | = lv_i_matnr | |
| I_MTART | = lv_i_mtart | |
| I_XLIFO | = lv_i_xlifo | |
| I_MYPOL | = lv_i_mypol | |
| I_NIWEX | = lv_i_niwex | |
| I_BUKRS | = lv_i_bukrs | |
| IS_NIWE | = lv_is_niwe | |
| IMPORTING | ||
| E_SUBRC | = lv_e_subrc | |
| E_CUSTX | = lv_e_custx | |
| CHANGING | ||
| C_ERSDA | = lv_c_ersda | |
| . " MY_MATERIAL_EXCLUDE_CHECK | ||
ABAP code using 7.40 inline data declarations to call FM MY_MATERIAL_EXCLUDE_CHECK
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 ERSDA FROM MARA INTO @DATA(ld_c_ersda). | ||||
| "SELECT single SUBRC FROM SY INTO @DATA(ld_e_subrc). | ||||
| "SELECT single BWKEY FROM MBEW INTO @DATA(ld_i_bwkey). | ||||
| "SELECT single CUSTX FROM SNIWE INTO @DATA(ld_e_custx). | ||||
| "SELECT single MATNR FROM MBEW INTO @DATA(ld_i_matnr). | ||||
| "SELECT single MTART FROM MARA INTO @DATA(ld_i_mtart). | ||||
| "SELECT single XLIFO FROM MBEW INTO @DATA(ld_i_xlifo). | ||||
| "SELECT single MYPOL FROM MBEW INTO @DATA(ld_i_mypol). | ||||
| "SELECT single NIWEX FROM SNIWE INTO @DATA(ld_i_niwex). | ||||
Search for further information about these or an SAP related objects