SAP MATERIAL_EXTRACT Function Module for Extractor Materials









MATERIAL_EXTRACT is a standard material extract SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Extractor Materials 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 extract FM, simply by entering the name MATERIAL_EXTRACT into the relevant SAP transaction such as SE37 or SE38.

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



Function MATERIAL_EXTRACT 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_EXTRACT'"Extractor Materials
EXPORTING
I_DISTMODE = "DE-EN-LANG-SWITCH-NO-TRANSLATION
I_BLOCKSIZE = "DE-EN-LANG-SWITCH-NO-TRANSLATION
I_INITMODE = "Initialization Mode
* I_MESSENGERID = "

TABLES
I_T_SELECT = "
I_T_TRANSFER = "
* E_T_IDOCNUM = "
* E_T_MESSNUM = "
E_T_MESSAGES = "

EXCEPTIONS
EXTRACTION_FAILED = 1 NO_MORE_DATA = 2 WRONG_CALL = 3
.



IMPORTING Parameters details for MATERIAL_EXTRACT

I_DISTMODE - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type: MDM_EXTRACTOR-DISTMODE
Optional: No
Call by Reference: No ( called with pass by value option)

I_BLOCKSIZE - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type: MDM_EXTRACTOR-BLOCKSIZE
Optional: No
Call by Reference: No ( called with pass by value option)

I_INITMODE - Initialization Mode

Data type: MDM_DATA-XFELD
Optional: No
Call by Reference: No ( called with pass by value option)

I_MESSENGERID -

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

TABLES Parameters details for MATERIAL_EXTRACT

I_T_SELECT -

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

I_T_TRANSFER -

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

E_T_IDOCNUM -

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

E_T_MESSNUM -

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

E_T_MESSAGES -

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

EXCEPTIONS details

EXTRACTION_FAILED - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

NO_MORE_DATA - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

WRONG_CALL -

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

Copy and paste ABAP code example for MATERIAL_EXTRACT 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_i_distmode  TYPE MDM_EXTRACTOR-DISTMODE, "   
lt_i_t_select  TYPE STANDARD TABLE OF MDM01_T_SELECTION, "   
lv_extraction_failed  TYPE MDM01_T_SELECTION, "   
lv_i_blocksize  TYPE MDM_EXTRACTOR-BLOCKSIZE, "   
lt_i_t_transfer  TYPE STANDARD TABLE OF MDM01_T_TRANSFERS, "   
lv_no_more_data  TYPE MDM01_T_TRANSFERS, "   
lv_i_initmode  TYPE MDM_DATA-XFELD, "   
lv_wrong_call  TYPE MDM_DATA, "   
lt_e_t_idocnum  TYPE STANDARD TABLE OF MDM01_T_IDOCNUM, "   
lt_e_t_messnum  TYPE STANDARD TABLE OF MDM01_T_MESSNUM, "   
lv_i_messengerid  TYPE MDM_REQUEST-MESSENGERID, "   
lt_e_t_messages  TYPE STANDARD TABLE OF BALMI. "   

  CALL FUNCTION 'MATERIAL_EXTRACT'  "Extractor Materials
    EXPORTING
         I_DISTMODE = lv_i_distmode
         I_BLOCKSIZE = lv_i_blocksize
         I_INITMODE = lv_i_initmode
         I_MESSENGERID = lv_i_messengerid
    TABLES
         I_T_SELECT = lt_i_t_select
         I_T_TRANSFER = lt_i_t_transfer
         E_T_IDOCNUM = lt_e_t_idocnum
         E_T_MESSNUM = lt_e_t_messnum
         E_T_MESSAGES = lt_e_t_messages
    EXCEPTIONS
        EXTRACTION_FAILED = 1
        NO_MORE_DATA = 2
        WRONG_CALL = 3
. " MATERIAL_EXTRACT




ABAP code using 7.40 inline data declarations to call FM MATERIAL_EXTRACT

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 DISTMODE FROM MDM_EXTRACTOR INTO @DATA(ld_i_distmode).
 
 
 
"SELECT single BLOCKSIZE FROM MDM_EXTRACTOR INTO @DATA(ld_i_blocksize).
 
 
 
"SELECT single XFELD FROM MDM_DATA INTO @DATA(ld_i_initmode).
 
 
 
 
"SELECT single MESSENGERID FROM MDM_REQUEST INTO @DATA(ld_i_messengerid).
 
 


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!