SAP MY_MATERIAL_DATA_GET Function Module for
MY_MATERIAL_DATA_GET is a standard my material data get 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 data get FM, simply by entering the name MY_MATERIAL_DATA_GET into the relevant SAP transaction such as SE37 or SE38.
Function Group: LIFO
Program Name: SAPLLIFO
Main Program: SAPLLIFO
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MY_MATERIAL_DATA_GET 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_DATA_GET'".
EXPORTING
IS_MYPAR = "
* IS_NIWEL6 = "Transfer Structure for Lowest Val. Comparison LIFO (Special)
* IS_NIWEL = "Transfer Structure for Lowest Value Determination
* I_MSM_MBEW_SEL = "
IS_NIWE = "Transaction Code
I_LEVEL = "
I_MATNR = "Material Number
I_MYKEY = "LIFO Valuation Level
IT_BWKEYS_WERKS = "
* IS_POOL = "Base Unit of Measure
* I_IDX_CALC = "Checkbox
* I_ACC_ASSIGN = "Checkbox
IMPORTING
ES_NIWEMAT = "
ET_NIWESPL = "
ET_NIWEABW = "
E_UMREF = "FLTP Field Type
CHANGING
* XS_NIWEMAT = "Material Master Data at Balance Sheet Valuation Level
* XS_MYSTA = "Balance Sheet Valuation: Procedure Statistics Table
TABLES
* T_INDEX = "Structure for Index LIFO Valuation
* TRA_MTART = "
* T_PRICEACT = "Communication Structure for Price Activity
* T_MYMBEW_BUKRS = "
* T_MBEW_EXT = "
EXCEPTIONS
UNIT_CONVERSION_ERROR = 1 ACCOUNT_ASSIGNMENT_ERROR = 2 MTART_CHECK = 3
IMPORTING Parameters details for MY_MATERIAL_DATA_GET
IS_MYPAR -
Data type: MYPAROptional: No
Call by Reference: Yes
IS_NIWEL6 - Transfer Structure for Lowest Val. Comparison LIFO (Special)
Data type: SNIWEL6Optional: Yes
Call by Reference: No ( called with pass by value option)
IS_NIWEL - Transfer Structure for Lowest Value Determination
Data type: SNIWELOptional: Yes
Call by Reference: No ( called with pass by value option)
I_MSM_MBEW_SEL -
Data type: COptional: Yes
Call by Reference: Yes
IS_NIWE - Transaction Code
Data type: SNIWEOptional: No
Call by Reference: Yes
I_LEVEL -
Data type: TCURM-MYKEY_CUSOptional: No
Call by Reference: Yes
I_MATNR - Material Number
Data type: MATNROptional: No
Call by Reference: Yes
I_MYKEY - LIFO Valuation Level
Data type: MYKEYOptional: No
Call by Reference: Yes
IT_BWKEYS_WERKS -
Data type: BWKEYS_WERKS_TABOptional: No
Call by Reference: Yes
IS_POOL - Base Unit of Measure
Data type: TPOOLOptional: Yes
Call by Reference: Yes
I_IDX_CALC - Checkbox
Data type: XFELDOptional: Yes
Call by Reference: Yes
I_ACC_ASSIGN - Checkbox
Data type: XFELDOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for MY_MATERIAL_DATA_GET
ES_NIWEMAT -
Data type: SNIWEMATOptional: No
Call by Reference: Yes
ET_NIWESPL -
Data type: NIWESPL_TABOptional: No
Call by Reference: Yes
ET_NIWEABW -
Data type: NIWEABW_TABOptional: No
Call by Reference: Yes
E_UMREF - FLTP Field Type
Data type: FLOATOptional: No
Call by Reference: Yes
CHANGING Parameters details for MY_MATERIAL_DATA_GET
XS_NIWEMAT - Material Master Data at Balance Sheet Valuation Level
Data type: SNIWEMATOptional: Yes
Call by Reference: Yes
XS_MYSTA - Balance Sheet Valuation: Procedure Statistics Table
Data type: MYSTAOptional: Yes
Call by Reference: Yes
TABLES Parameters details for MY_MATERIAL_DATA_GET
T_INDEX - Structure for Index LIFO Valuation
Data type: SLIFOINDEXOptional: Yes
Call by Reference: No ( called with pass by value option)
TRA_MTART -
Data type: RANGE_C4Optional: Yes
Call by Reference: No ( called with pass by value option)
T_PRICEACT - Communication Structure for Price Activity
Data type: SMYPRICEACTOptional: Yes
Call by Reference: No ( called with pass by value option)
T_MYMBEW_BUKRS -
Data type: MYMBEW_BUKRSOptional: Yes
Call by Reference: Yes
T_MBEW_EXT -
Data type: MBEWOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
UNIT_CONVERSION_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ACCOUNT_ASSIGNMENT_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MTART_CHECK -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MY_MATERIAL_DATA_GET 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_t_index | TYPE STANDARD TABLE OF SLIFOINDEX, " | |||
| lv_is_mypar | TYPE MYPAR, " | |||
| lv_es_niwemat | TYPE SNIWEMAT, " | |||
| lv_xs_niwemat | TYPE SNIWEMAT, " | |||
| lv_unit_conversion_error | TYPE SNIWEMAT, " | |||
| lv_is_niwel6 | TYPE SNIWEL6, " | |||
| lv_is_niwel | TYPE SNIWEL, " | |||
| lv_i_msm_mbew_sel | TYPE C, " | |||
| lv_is_niwe | TYPE SNIWE, " | |||
| lv_xs_mysta | TYPE MYSTA, " | |||
| lt_tra_mtart | TYPE STANDARD TABLE OF RANGE_C4, " | |||
| lv_et_niwespl | TYPE NIWESPL_TAB, " | |||
| lv_account_assignment_error | TYPE NIWESPL_TAB, " | |||
| lv_i_level | TYPE TCURM-MYKEY_CUS, " | |||
| lv_et_niweabw | TYPE NIWEABW_TAB, " | |||
| lt_t_priceact | TYPE STANDARD TABLE OF SMYPRICEACT, " | |||
| lv_mtart_check | TYPE SMYPRICEACT, " | |||
| lv_e_umref | TYPE FLOAT, " | |||
| lv_i_matnr | TYPE MATNR, " | |||
| lt_t_mymbew_bukrs | TYPE STANDARD TABLE OF MYMBEW_BUKRS, " | |||
| lv_i_mykey | TYPE MYKEY, " | |||
| lt_t_mbew_ext | TYPE STANDARD TABLE OF MBEW, " | |||
| lv_it_bwkeys_werks | TYPE BWKEYS_WERKS_TAB, " | |||
| lv_is_pool | TYPE TPOOL, " | |||
| lv_i_idx_calc | TYPE XFELD, " | |||
| lv_i_acc_assign | TYPE XFELD. " |
|   CALL FUNCTION 'MY_MATERIAL_DATA_GET' " |
| EXPORTING | ||
| IS_MYPAR | = lv_is_mypar | |
| IS_NIWEL6 | = lv_is_niwel6 | |
| IS_NIWEL | = lv_is_niwel | |
| I_MSM_MBEW_SEL | = lv_i_msm_mbew_sel | |
| IS_NIWE | = lv_is_niwe | |
| I_LEVEL | = lv_i_level | |
| I_MATNR | = lv_i_matnr | |
| I_MYKEY | = lv_i_mykey | |
| IT_BWKEYS_WERKS | = lv_it_bwkeys_werks | |
| IS_POOL | = lv_is_pool | |
| I_IDX_CALC | = lv_i_idx_calc | |
| I_ACC_ASSIGN | = lv_i_acc_assign | |
| IMPORTING | ||
| ES_NIWEMAT | = lv_es_niwemat | |
| ET_NIWESPL | = lv_et_niwespl | |
| ET_NIWEABW | = lv_et_niweabw | |
| E_UMREF | = lv_e_umref | |
| CHANGING | ||
| XS_NIWEMAT | = lv_xs_niwemat | |
| XS_MYSTA | = lv_xs_mysta | |
| TABLES | ||
| T_INDEX | = lt_t_index | |
| TRA_MTART | = lt_tra_mtart | |
| T_PRICEACT | = lt_t_priceact | |
| T_MYMBEW_BUKRS | = lt_t_mymbew_bukrs | |
| T_MBEW_EXT | = lt_t_mbew_ext | |
| EXCEPTIONS | ||
| UNIT_CONVERSION_ERROR = 1 | ||
| ACCOUNT_ASSIGNMENT_ERROR = 2 | ||
| MTART_CHECK = 3 | ||
| . " MY_MATERIAL_DATA_GET | ||
ABAP code using 7.40 inline data declarations to call FM MY_MATERIAL_DATA_GET
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 MYKEY_CUS FROM TCURM INTO @DATA(ld_i_level). | ||||
Search for further information about these or an SAP related objects