SAP MEX_COMMON_WERK_AND_LTS Function Module for NOTRANSL: Liefert für Bestellpositionen gemeinsames Werk und LTS (falls vo
MEX_COMMON_WERK_AND_LTS is a standard mex common werk and lts 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: Liefert für Bestellpositionen gemeinsames Werk und LTS (falls vo 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 mex common werk and lts FM, simply by entering the name MEX_COMMON_WERK_AND_LTS into the relevant SAP transaction such as SE37 or SE38.
Function Group: MEXF
Program Name: SAPLMEXF
Main Program: SAPLMEXF
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MEX_COMMON_WERK_AND_LTS 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 'MEX_COMMON_WERK_AND_LTS'"NOTRANSL: Liefert für Bestellpositionen gemeinsames Werk und LTS (falls vo.
EXPORTING
I_MAWE = "
I_LIFNR = "Vendor
IMPORTING
E_WERKS = "
E_LTSNR = "
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_SAPLMEXF_001 No Invoice for Purchase Order Item but Conditions Allowed
IMPORTING Parameters details for MEX_COMMON_WERK_AND_LTS
I_MAWE -
Data type: ITAB_MAWEOptional: No
Call by Reference: No ( called with pass by value option)
I_LIFNR - Vendor
Data type: EKKO-LIFNROptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MEX_COMMON_WERK_AND_LTS
E_WERKS -
Data type: EKPO-WERKSOptional: No
Call by Reference: No ( called with pass by value option)
E_LTSNR -
Data type: EKPO-LTSNROptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MEX_COMMON_WERK_AND_LTS 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_mawe | TYPE ITAB_MAWE, " | |||
| lv_e_werks | TYPE EKPO-WERKS, " | |||
| lv_e_ltsnr | TYPE EKPO-LTSNR, " | |||
| lv_i_lifnr | TYPE EKKO-LIFNR. " |
|   CALL FUNCTION 'MEX_COMMON_WERK_AND_LTS' "NOTRANSL: Liefert für Bestellpositionen gemeinsames Werk und LTS (falls vo |
| EXPORTING | ||
| I_MAWE | = lv_i_mawe | |
| I_LIFNR | = lv_i_lifnr | |
| IMPORTING | ||
| E_WERKS | = lv_e_werks | |
| E_LTSNR | = lv_e_ltsnr | |
| . " MEX_COMMON_WERK_AND_LTS | ||
ABAP code using 7.40 inline data declarations to call FM MEX_COMMON_WERK_AND_LTS
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 WERKS FROM EKPO INTO @DATA(ld_e_werks). | ||||
| "SELECT single LTSNR FROM EKPO INTO @DATA(ld_e_ltsnr). | ||||
| "SELECT single LIFNR FROM EKKO INTO @DATA(ld_i_lifnr). | ||||
Search for further information about these or an SAP related objects