SAP MBEW_XLIFO Function Module for NOTRANSL: Prüfen LIFO-Daten
MBEW_XLIFO is a standard mbew xlifo 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: Prüfen LIFO-Daten 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 mbew xlifo FM, simply by entering the name MBEW_XLIFO into the relevant SAP transaction such as SE37 or SE38.
Function Group: MG11
Program Name: SAPLMG11
Main Program: SAPLMG11
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MBEW_XLIFO 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 'MBEW_XLIFO'"NOTRANSL: Prüfen LIFO-Daten.
EXPORTING
WMBEW_MATNR = "
WMBEW_BWKEY = "
WMBEW_XLIFO = "LIFO/FIFO-Relevant
WMBEW_MYPOL = "Pool number, LIFO valuation
WMYMS_MYPOOL = "
NEUFLAG = "
SPERRMODUS = "
* P_MESSAGE = ' ' "
* FLG_RETAIL = ' ' "Propose Field Content from the Reference
IMPORTING
WMYMS_MYPOOL = "
TABLES
PTAB_IN = "
EXCEPTIONS
ERROR_LIFO = 1
IMPORTING Parameters details for MBEW_XLIFO
WMBEW_MATNR -
Data type: MBEW-MATNROptional: No
Call by Reference: No ( called with pass by value option)
WMBEW_BWKEY -
Data type: MBEW-BWKEYOptional: No
Call by Reference: No ( called with pass by value option)
WMBEW_XLIFO - LIFO/FIFO-Relevant
Data type: MBEW-XLIFOOptional: No
Call by Reference: No ( called with pass by value option)
WMBEW_MYPOL - Pool number, LIFO valuation
Data type: MBEW-MYPOLOptional: No
Call by Reference: No ( called with pass by value option)
WMYMS_MYPOOL -
Data type: MYMS-MYPOOLOptional: No
Call by Reference: No ( called with pass by value option)
NEUFLAG -
Data type: T130F-KZREFOptional: No
Call by Reference: No ( called with pass by value option)
SPERRMODUS -
Data type: TVGVI-SPERAOptional: No
Call by Reference: No ( called with pass by value option)
P_MESSAGE -
Data type: RMMG08_012-MSGTYPDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_RETAIL - Propose Field Content from the Reference
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MBEW_XLIFO
WMYMS_MYPOOL -
Data type: MYMS-MYPOOLOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MBEW_XLIFO
PTAB_IN -
Data type: SPTAPOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ERROR_LIFO -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MBEW_XLIFO 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_ptab_in | TYPE STANDARD TABLE OF SPTAP, " | |||
| lv_error_lifo | TYPE SPTAP, " | |||
| lv_wmbew_matnr | TYPE MBEW-MATNR, " | |||
| lv_wmyms_mypool | TYPE MYMS-MYPOOL, " | |||
| lv_wmbew_bwkey | TYPE MBEW-BWKEY, " | |||
| lv_wmbew_xlifo | TYPE MBEW-XLIFO, " | |||
| lv_wmbew_mypol | TYPE MBEW-MYPOL, " | |||
| lv_wmyms_mypool | TYPE MYMS-MYPOOL, " | |||
| lv_neuflag | TYPE T130F-KZREF, " | |||
| lv_sperrmodus | TYPE TVGVI-SPERA, " | |||
| lv_p_message | TYPE RMMG08_012-MSGTYP, " SPACE | |||
| lv_flg_retail | TYPE XFELD. " SPACE |
|   CALL FUNCTION 'MBEW_XLIFO' "NOTRANSL: Prüfen LIFO-Daten |
| EXPORTING | ||
| WMBEW_MATNR | = lv_wmbew_matnr | |
| WMBEW_BWKEY | = lv_wmbew_bwkey | |
| WMBEW_XLIFO | = lv_wmbew_xlifo | |
| WMBEW_MYPOL | = lv_wmbew_mypol | |
| WMYMS_MYPOOL | = lv_wmyms_mypool | |
| NEUFLAG | = lv_neuflag | |
| SPERRMODUS | = lv_sperrmodus | |
| P_MESSAGE | = lv_p_message | |
| FLG_RETAIL | = lv_flg_retail | |
| IMPORTING | ||
| WMYMS_MYPOOL | = lv_wmyms_mypool | |
| TABLES | ||
| PTAB_IN | = lt_ptab_in | |
| EXCEPTIONS | ||
| ERROR_LIFO = 1 | ||
| . " MBEW_XLIFO | ||
ABAP code using 7.40 inline data declarations to call FM MBEW_XLIFO
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 MATNR FROM MBEW INTO @DATA(ld_wmbew_matnr). | ||||
| "SELECT single MYPOOL FROM MYMS INTO @DATA(ld_wmyms_mypool). | ||||
| "SELECT single BWKEY FROM MBEW INTO @DATA(ld_wmbew_bwkey). | ||||
| "SELECT single XLIFO FROM MBEW INTO @DATA(ld_wmbew_xlifo). | ||||
| "SELECT single MYPOL FROM MBEW INTO @DATA(ld_wmbew_mypol). | ||||
| "SELECT single MYPOOL FROM MYMS INTO @DATA(ld_wmyms_mypool). | ||||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_neuflag). | ||||
| "SELECT single SPERA FROM TVGVI INTO @DATA(ld_sperrmodus). | ||||
| "SELECT single MSGTYP FROM RMMG08_012 INTO @DATA(ld_p_message). | ||||
| DATA(ld_p_message) | = ' '. | |||
| DATA(ld_flg_retail) | = ' '. | |||
Search for further information about these or an SAP related objects