SAP MURC_MENGENUMRECHNUNG Function Module for PossEntries Pushbutton and Check f. Qty Convers. f. Var. UoM (Steel/WS)
MURC_MENGENUMRECHNUNG is a standard murc mengenumrechnung SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for PossEntries Pushbutton and Check f. Qty Convers. f. Var. UoM (Steel/WS) 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 murc mengenumrechnung FM, simply by entering the name MURC_MENGENUMRECHNUNG into the relevant SAP transaction such as SE37 or SE38.
Function Group: MURC
Program Name: SAPLMURC
Main Program: SAPLMURC
Appliation area: M
Release date: 20-Jan-1998
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MURC_MENGENUMRECHNUNG 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 'MURC_MENGENUMRECHNUNG'"PossEntries Pushbutton and Check f. Qty Convers. f. Var. UoM (Steel/WS).
EXPORTING
MATNR = "Material Number
* UMREN = "Conversion Factor: Denominator From Document Item
* PARALLEL = ' ' "Entry in Base UoM and Unit of Entry
* ALTME = "= UnI for Reserv.; = PUn for Plnd Ord.
* ALTME_TYPE = ' ' "F: Alt.Unit = PUn, A: Alt.Unit = UnI
* KZWSO = "Indicator: Active Ingred. Procssng
* TRTYP = 'A' "Transaction Type
* HELL = ' ' "Indicates Whether Quantity Popup is Processed
* NO_DIALOG = ' ' "
* KLASSIFIZIERUNG = ' ' "X: Display Classification via Button
* VALUES_KEEP = ' ' "X: Adopt UnE, SKU From Document
WERKS = "Plant
* ALTME_CAN_BE_CHANGED = 'X' "
* LGORT = "Storage Location
* CHARG = "Batch
* MENGE = "Quantity in Base UN
* MEINS = "Base Un
ERFMG = "Entry Qty in Unit of Entry
ERFME = "Unit of Entry
* UMREZ = "Conversion Factor: Numerator From Document Item
IMPORTING
O_MENGE = "Qty Calculated in BUn
O_ERFMG = "New Entry Quantity in Unit of Entry
O_ERFME = "New Unit of Entry
O_UMREZ = "Conversion Factor: Numerator From Popup
O_UMREN = "Conversion Factor: Denominator From Popup
O_KZWSO = "
TABLES
* OBJECTTAB = "
EXCEPTIONS
CALCULATION_WRONG = 1 BATCH_NOT_CLASSIFIED = 2 ROUNDING_ERROR_ERFME = 3
IMPORTING Parameters details for MURC_MENGENUMRECHNUNG
MATNR - Material Number
Data type: MARA-MATNROptional: No
Call by Reference: No ( called with pass by value option)
UMREN - Conversion Factor: Denominator From Document Item
Data type: MARM-UMRENOptional: Yes
Call by Reference: No ( called with pass by value option)
PARALLEL - Entry in Base UoM and Unit of Entry
Data type: CYREFS-FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ALTME - = UnI for Reserv.; = PUn for Plnd Ord.
Data type: MSEG-ERFMEOptional: Yes
Call by Reference: No ( called with pass by value option)
ALTME_TYPE - F: Alt.Unit = PUn, A: Alt.Unit = UnI
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
KZWSO - Indicator: Active Ingred. Procssng
Data type: MARA-KZWSMOptional: Yes
Call by Reference: No ( called with pass by value option)
TRTYP - Transaction Type
Data type: T158-TRTYPDefault: 'A'
Optional: Yes
Call by Reference: No ( called with pass by value option)
HELL - Indicates Whether Quantity Popup is Processed
Data type: CYREFS-FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
NO_DIALOG -
Data type: CYREFS-FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
KLASSIFIZIERUNG - X: Display Classification via Button
Data type: CYREFS-FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
VALUES_KEEP - X: Adopt UnE, SKU From Document
Data type: CYREFS-FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WERKS - Plant
Data type: MARC-WERKSOptional: No
Call by Reference: No ( called with pass by value option)
ALTME_CAN_BE_CHANGED -
Data type: CYREFS-FLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
LGORT - Storage Location
Data type: MSEG-LGORTOptional: Yes
Call by Reference: No ( called with pass by value option)
CHARG - Batch
Data type: MSEG-CHARGOptional: Yes
Call by Reference: No ( called with pass by value option)
MENGE - Quantity in Base UN
Data type: MSEG-MENGEOptional: Yes
Call by Reference: No ( called with pass by value option)
MEINS - Base Un
Data type: MSEG-MEINSOptional: Yes
Call by Reference: No ( called with pass by value option)
ERFMG - Entry Qty in Unit of Entry
Data type: MSEG-ERFMGOptional: No
Call by Reference: No ( called with pass by value option)
ERFME - Unit of Entry
Data type: MSEG-ERFMEOptional: No
Call by Reference: No ( called with pass by value option)
UMREZ - Conversion Factor: Numerator From Document Item
Data type: MARM-UMREZOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MURC_MENGENUMRECHNUNG
O_MENGE - Qty Calculated in BUn
Data type: MSEG-MENGEOptional: No
Call by Reference: No ( called with pass by value option)
O_ERFMG - New Entry Quantity in Unit of Entry
Data type: MSEG-ERFMGOptional: No
Call by Reference: No ( called with pass by value option)
O_ERFME - New Unit of Entry
Data type: MSEG-ERFMEOptional: No
Call by Reference: No ( called with pass by value option)
O_UMREZ - Conversion Factor: Numerator From Popup
Data type: MARM-UMREZOptional: No
Call by Reference: No ( called with pass by value option)
O_UMREN - Conversion Factor: Denominator From Popup
Data type: MARM-UMRENOptional: No
Call by Reference: No ( called with pass by value option)
O_KZWSO -
Data type: MARA-KZWSMOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MURC_MENGENUMRECHNUNG
OBJECTTAB -
Data type: CLTABLEOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CALCULATION_WRONG - Error During Qty Conversion
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
BATCH_NOT_CLASSIFIED - Batch Not Classified
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ROUNDING_ERROR_ERFME - UnEntry Must be Replaced to Prevent Rounding Errors
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MURC_MENGENUMRECHNUNG 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 MARA-MATNR, " | |||
| lv_o_menge | TYPE MSEG-MENGE, " | |||
| lt_objecttab | TYPE STANDARD TABLE OF CLTABLE, " | |||
| lv_calculation_wrong | TYPE CLTABLE, " | |||
| lv_umren | TYPE MARM-UMREN, " | |||
| lv_parallel | TYPE CYREFS-FLAG, " SPACE | |||
| lv_altme | TYPE MSEG-ERFME, " | |||
| lv_altme_type | TYPE C, " SPACE | |||
| lv_kzwso | TYPE MARA-KZWSM, " | |||
| lv_trtyp | TYPE T158-TRTYP, " 'A' | |||
| lv_hell | TYPE CYREFS-FLAG, " SPACE | |||
| lv_no_dialog | TYPE CYREFS-FLAG, " SPACE | |||
| lv_klassifizierung | TYPE CYREFS-FLAG, " SPACE | |||
| lv_values_keep | TYPE CYREFS-FLAG, " SPACE | |||
| lv_werks | TYPE MARC-WERKS, " | |||
| lv_o_erfmg | TYPE MSEG-ERFMG, " | |||
| lv_batch_not_classified | TYPE MSEG, " | |||
| lv_altme_can_be_changed | TYPE CYREFS-FLAG, " 'X' | |||
| lv_lgort | TYPE MSEG-LGORT, " | |||
| lv_o_erfme | TYPE MSEG-ERFME, " | |||
| lv_rounding_error_erfme | TYPE MSEG, " | |||
| lv_charg | TYPE MSEG-CHARG, " | |||
| lv_o_umrez | TYPE MARM-UMREZ, " | |||
| lv_menge | TYPE MSEG-MENGE, " | |||
| lv_o_umren | TYPE MARM-UMREN, " | |||
| lv_meins | TYPE MSEG-MEINS, " | |||
| lv_o_kzwso | TYPE MARA-KZWSM, " | |||
| lv_erfmg | TYPE MSEG-ERFMG, " | |||
| lv_erfme | TYPE MSEG-ERFME, " | |||
| lv_umrez | TYPE MARM-UMREZ. " |
|   CALL FUNCTION 'MURC_MENGENUMRECHNUNG' "PossEntries Pushbutton and Check f. Qty Convers. f. Var. UoM (Steel/WS) |
| EXPORTING | ||
| MATNR | = lv_matnr | |
| UMREN | = lv_umren | |
| PARALLEL | = lv_parallel | |
| ALTME | = lv_altme | |
| ALTME_TYPE | = lv_altme_type | |
| KZWSO | = lv_kzwso | |
| TRTYP | = lv_trtyp | |
| HELL | = lv_hell | |
| NO_DIALOG | = lv_no_dialog | |
| KLASSIFIZIERUNG | = lv_klassifizierung | |
| VALUES_KEEP | = lv_values_keep | |
| WERKS | = lv_werks | |
| ALTME_CAN_BE_CHANGED | = lv_altme_can_be_changed | |
| LGORT | = lv_lgort | |
| CHARG | = lv_charg | |
| MENGE | = lv_menge | |
| MEINS | = lv_meins | |
| ERFMG | = lv_erfmg | |
| ERFME | = lv_erfme | |
| UMREZ | = lv_umrez | |
| IMPORTING | ||
| O_MENGE | = lv_o_menge | |
| O_ERFMG | = lv_o_erfmg | |
| O_ERFME | = lv_o_erfme | |
| O_UMREZ | = lv_o_umrez | |
| O_UMREN | = lv_o_umren | |
| O_KZWSO | = lv_o_kzwso | |
| TABLES | ||
| OBJECTTAB | = lt_objecttab | |
| EXCEPTIONS | ||
| CALCULATION_WRONG = 1 | ||
| BATCH_NOT_CLASSIFIED = 2 | ||
| ROUNDING_ERROR_ERFME = 3 | ||
| . " MURC_MENGENUMRECHNUNG | ||
ABAP code using 7.40 inline data declarations to call FM MURC_MENGENUMRECHNUNG
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 MARA INTO @DATA(ld_matnr). | ||||
| "SELECT single MENGE FROM MSEG INTO @DATA(ld_o_menge). | ||||
| "SELECT single UMREN FROM MARM INTO @DATA(ld_umren). | ||||
| "SELECT single FLAG FROM CYREFS INTO @DATA(ld_parallel). | ||||
| DATA(ld_parallel) | = ' '. | |||
| "SELECT single ERFME FROM MSEG INTO @DATA(ld_altme). | ||||
| DATA(ld_altme_type) | = ' '. | |||
| "SELECT single KZWSM FROM MARA INTO @DATA(ld_kzwso). | ||||
| "SELECT single TRTYP FROM T158 INTO @DATA(ld_trtyp). | ||||
| DATA(ld_trtyp) | = 'A'. | |||
| "SELECT single FLAG FROM CYREFS INTO @DATA(ld_hell). | ||||
| DATA(ld_hell) | = ' '. | |||
| "SELECT single FLAG FROM CYREFS INTO @DATA(ld_no_dialog). | ||||
| DATA(ld_no_dialog) | = ' '. | |||
| "SELECT single FLAG FROM CYREFS INTO @DATA(ld_klassifizierung). | ||||
| DATA(ld_klassifizierung) | = ' '. | |||
| "SELECT single FLAG FROM CYREFS INTO @DATA(ld_values_keep). | ||||
| DATA(ld_values_keep) | = ' '. | |||
| "SELECT single WERKS FROM MARC INTO @DATA(ld_werks). | ||||
| "SELECT single ERFMG FROM MSEG INTO @DATA(ld_o_erfmg). | ||||
| "SELECT single FLAG FROM CYREFS INTO @DATA(ld_altme_can_be_changed). | ||||
| DATA(ld_altme_can_be_changed) | = 'X'. | |||
| "SELECT single LGORT FROM MSEG INTO @DATA(ld_lgort). | ||||
| "SELECT single ERFME FROM MSEG INTO @DATA(ld_o_erfme). | ||||
| "SELECT single CHARG FROM MSEG INTO @DATA(ld_charg). | ||||
| "SELECT single UMREZ FROM MARM INTO @DATA(ld_o_umrez). | ||||
| "SELECT single MENGE FROM MSEG INTO @DATA(ld_menge). | ||||
| "SELECT single UMREN FROM MARM INTO @DATA(ld_o_umren). | ||||
| "SELECT single MEINS FROM MSEG INTO @DATA(ld_meins). | ||||
| "SELECT single KZWSM FROM MARA INTO @DATA(ld_o_kzwso). | ||||
| "SELECT single ERFMG FROM MSEG INTO @DATA(ld_erfmg). | ||||
| "SELECT single ERFME FROM MSEG INTO @DATA(ld_erfme). | ||||
| "SELECT single UMREZ FROM MARM INTO @DATA(ld_umrez). | ||||
Search for further information about these or an SAP related objects