SAP MD_SHOW_QUANTITY_UNITS Function Module for NOTRANSL: Gibt die möglichen Mengeneinheiten eines Materials aus
MD_SHOW_QUANTITY_UNITS is a standard md show quantity units 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: Gibt die möglichen Mengeneinheiten eines Materials aus 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 md show quantity units FM, simply by entering the name MD_SHOW_QUANTITY_UNITS into the relevant SAP transaction such as SE37 or SE38.
Function Group: M61M
Program Name: SAPLM61M
Main Program: SAPLM61M
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MD_SHOW_QUANTITY_UNITS 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 'MD_SHOW_QUANTITY_UNITS'"NOTRANSL: Gibt die möglichen Mengeneinheiten eines Materials aus.
EXPORTING
MATNR = "Material number
* MEINS = "
* BSTME = "
* AUSME = "
* FRTME = "
* EXPME = "
* WIRAK = "
* WIRKF4 = "
* PLAUF = "
IMPORTING
MEINH = "Selected unit of measure
UMREN = "Denominator for conv. into base unit of measure
UMREZ = "Numerator for conv.into base unit of measure
SMEKZ = "
EXCEPTIONS
MATERIAL_NOT_FOUND = 1 NO_UNITS_FOUND = 2
IMPORTING Parameters details for MD_SHOW_QUANTITY_UNITS
MATNR - Material number
Data type: MT61D-MATNROptional: No
Call by Reference: No ( called with pass by value option)
MEINS -
Data type: MT61D-MEINSOptional: Yes
Call by Reference: No ( called with pass by value option)
BSTME -
Data type: MT61D-BSTMEOptional: Yes
Call by Reference: No ( called with pass by value option)
AUSME -
Data type: MT61D-AUSMEOptional: Yes
Call by Reference: No ( called with pass by value option)
FRTME -
Data type: MT61D-FRTMEOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPME -
Data type: MT61D-EXPMEOptional: Yes
Call by Reference: No ( called with pass by value option)
WIRAK -
Data type: MDST-WIRAKOptional: Yes
Call by Reference: No ( called with pass by value option)
WIRKF4 -
Data type: MDST-WIRKF4Optional: Yes
Call by Reference: No ( called with pass by value option)
PLAUF -
Data type: CM61X-PLAUFOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MD_SHOW_QUANTITY_UNITS
MEINH - Selected unit of measure
Data type: RMMME-MEINHOptional: No
Call by Reference: No ( called with pass by value option)
UMREN - Denominator for conv. into base unit of measure
Data type: RMMME-UMRENOptional: No
Call by Reference: No ( called with pass by value option)
UMREZ - Numerator for conv.into base unit of measure
Data type: RMMME-UMREZOptional: No
Call by Reference: No ( called with pass by value option)
SMEKZ -
Data type: T449U-SMEKZOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
MATERIAL_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_UNITS_FOUND - No alternative unit of measure found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MD_SHOW_QUANTITY_UNITS 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_matnr | TYPE MT61D-MATNR, " | |||
| lv_meinh | TYPE RMMME-MEINH, " | |||
| lv_material_not_found | TYPE RMMME, " | |||
| lv_meins | TYPE MT61D-MEINS, " | |||
| lv_umren | TYPE RMMME-UMREN, " | |||
| lv_no_units_found | TYPE RMMME, " | |||
| lv_bstme | TYPE MT61D-BSTME, " | |||
| lv_umrez | TYPE RMMME-UMREZ, " | |||
| lv_ausme | TYPE MT61D-AUSME, " | |||
| lv_smekz | TYPE T449U-SMEKZ, " | |||
| lv_frtme | TYPE MT61D-FRTME, " | |||
| lv_expme | TYPE MT61D-EXPME, " | |||
| lv_wirak | TYPE MDST-WIRAK, " | |||
| lv_wirkf4 | TYPE MDST-WIRKF4, " | |||
| lv_plauf | TYPE CM61X-PLAUF. " |
|   CALL FUNCTION 'MD_SHOW_QUANTITY_UNITS' "NOTRANSL: Gibt die möglichen Mengeneinheiten eines Materials aus |
| EXPORTING | ||
| MATNR | = lv_matnr | |
| MEINS | = lv_meins | |
| BSTME | = lv_bstme | |
| AUSME | = lv_ausme | |
| FRTME | = lv_frtme | |
| EXPME | = lv_expme | |
| WIRAK | = lv_wirak | |
| WIRKF4 | = lv_wirkf4 | |
| PLAUF | = lv_plauf | |
| IMPORTING | ||
| MEINH | = lv_meinh | |
| UMREN | = lv_umren | |
| UMREZ | = lv_umrez | |
| SMEKZ | = lv_smekz | |
| EXCEPTIONS | ||
| MATERIAL_NOT_FOUND = 1 | ||
| NO_UNITS_FOUND = 2 | ||
| . " MD_SHOW_QUANTITY_UNITS | ||
ABAP code using 7.40 inline data declarations to call FM MD_SHOW_QUANTITY_UNITS
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 MT61D INTO @DATA(ld_matnr). | ||||
| "SELECT single MEINH FROM RMMME INTO @DATA(ld_meinh). | ||||
| "SELECT single MEINS FROM MT61D INTO @DATA(ld_meins). | ||||
| "SELECT single UMREN FROM RMMME INTO @DATA(ld_umren). | ||||
| "SELECT single BSTME FROM MT61D INTO @DATA(ld_bstme). | ||||
| "SELECT single UMREZ FROM RMMME INTO @DATA(ld_umrez). | ||||
| "SELECT single AUSME FROM MT61D INTO @DATA(ld_ausme). | ||||
| "SELECT single SMEKZ FROM T449U INTO @DATA(ld_smekz). | ||||
| "SELECT single FRTME FROM MT61D INTO @DATA(ld_frtme). | ||||
| "SELECT single EXPME FROM MT61D INTO @DATA(ld_expme). | ||||
| "SELECT single WIRAK FROM MDST INTO @DATA(ld_wirak). | ||||
| "SELECT single WIRKF4 FROM MDST INTO @DATA(ld_wirkf4). | ||||
| "SELECT single PLAUF FROM CM61X INTO @DATA(ld_plauf). | ||||
Search for further information about these or an SAP related objects