SAP COS6_MENGE_TO_BDMNG Function Module for NOTRANSL: Konvertierung von MENGE in BDMNG und andere Mengenfelder









COS6_MENGE_TO_BDMNG is a standard cos6 menge to bdmng 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: Konvertierung von MENGE in BDMNG und andere Mengenfelder 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 cos6 menge to bdmng FM, simply by entering the name COS6_MENGE_TO_BDMNG into the relevant SAP transaction such as SE37 or SE38.

Function Group: COS6
Program Name: SAPLCOS6
Main Program: SAPLCOS6
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function COS6_MENGE_TO_BDMNG 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 'COS6_MENGE_TO_BDMNG'"NOTRANSL: Konvertierung von MENGE in BDMNG und andere Mengenfelder
EXPORTING
IS_RESBD = "Reservation/Dependent Requirements
I_UMREZ_OLD = "Numerator for Conversion to Base Units of Measure
I_UMREN_OLD = "Denominator for conversion to base units of measure
I_DUMPS_OLD = "Phantom Item Indicator
I_EWAHR_OLD = "Usage probability in % (alternative item)
I_ROANZ_OLD = "Number of Variable-Size Items
I_MSFCV_MEINS = "Base Unit of Measure
I_MSFCV_AUSME = "Unit of issue
I_AUFNR = "Order Number
I_AUTYP = "Order Category
I_GAMNG = "Total Order Quantity
I_MENGE_OLD = "Requirement quantity of the component
I_AKTYP = "Activity Category in Transaction
I_FLG_NO_DIALOG = "Selection Indicator
* I_FLG_INSR_WITH_REF = ' ' "Selection Indicator
I_BDMNG_OLD = "Requirement Quantity
I_NOMNG_OLD = "Input Quantity
I_EINHEIT_OLD = "Base Unit of Measure
I_ERFMG_OLD = "Quantity in Unit of Entry
I_MATNR_OLD = "Material Number
I_WERKS_OLD = "Plant
I_CHARG_OLD = "Batch Number

IMPORTING
E_MENGE = "Requirement quantity of the component
E_ROANZ = "Number of Variable-Size Items
E_ESMNG = "Usage quantity per order unit of measure
E_BWART = "Movement Type (Inventory Management)
E_SHKZG = "Debit/Credit Indicator
E_EINHEIT = "Base Unit of Measure
E_NOMNG = "Input Quantity
E_BDMNG = "Requirement Quantity
E_MEINS = "Base Unit of Measure
E_ERFMG = "Quantity in Unit of Entry
E_ERFME = "Unit of Entry
E_UMREN = "Denominator for conversion to base units of measure
E_UMREZ = "Numerator for Conversion to Base Units of Measure

EXCEPTIONS
NEGATIVE_PLAN_IND_REQ = 1 NEGATIVE_QUAN_NON_STOCK = 2 NEGATIVE_QUAN_COPRODUCT = 3 CONVERSION_NOT_POSSIBLE = 4 POPUP_CANCELED = 5 ORIGINAL_QUAN_TOO_SMALL = 6
.




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_SAPLCOS6_001 DE-EN-LANG-SWITCH-NO-TRANSLATION
EXIT_SAPLCOS6_002 Check a Newly Assigned Component

IMPORTING Parameters details for COS6_MENGE_TO_BDMNG

IS_RESBD - Reservation/Dependent Requirements

Data type: RESBD
Optional: No
Call by Reference: Yes

I_UMREZ_OLD - Numerator for Conversion to Base Units of Measure

Data type: RESBD-UMREZ
Optional: No
Call by Reference: Yes

I_UMREN_OLD - Denominator for conversion to base units of measure

Data type: RESBD-UMREN
Optional: No
Call by Reference: Yes

I_DUMPS_OLD - Phantom Item Indicator

Data type: RESBD-DUMPS
Optional: No
Call by Reference: Yes

I_EWAHR_OLD - Usage probability in % (alternative item)

Data type: RESBD-EWAHR
Optional: No
Call by Reference: Yes

I_ROANZ_OLD - Number of Variable-Size Items

Data type: RESBD-ROANZ
Optional: No
Call by Reference: Yes

I_MSFCV_MEINS - Base Unit of Measure

Data type: MSFCV-MEINS
Optional: No
Call by Reference: Yes

I_MSFCV_AUSME - Unit of issue

Data type: MSFCV-AUSME
Optional: No
Call by Reference: Yes

I_AUFNR - Order Number

Data type: CAUFVD-AUFNR
Optional: No
Call by Reference: Yes

I_AUTYP - Order Category

Data type: CAUFVD-AUTYP
Optional: No
Call by Reference: Yes

I_GAMNG - Total Order Quantity

Data type: CAUFVD-GAMNG
Optional: No
Call by Reference: Yes

I_MENGE_OLD - Requirement quantity of the component

Data type: RESBD-MENGE
Optional: No
Call by Reference: Yes

I_AKTYP - Activity Category in Transaction

Data type: RC27S-AKTYP
Optional: No
Call by Reference: Yes

I_FLG_NO_DIALOG - Selection Indicator

Data type: RC27X-FLG_SEL
Optional: No
Call by Reference: Yes

I_FLG_INSR_WITH_REF - Selection Indicator

Data type: RC27X-FLG_SEL
Default: SPACE
Optional: Yes
Call by Reference: Yes

I_BDMNG_OLD - Requirement Quantity

Data type: RESBD-BDMNG
Optional: No
Call by Reference: Yes

I_NOMNG_OLD - Input Quantity

Data type: RESBD-NOMNG
Optional: No
Call by Reference: Yes

I_EINHEIT_OLD - Base Unit of Measure

Data type: RESBD-EINHEIT
Optional: No
Call by Reference: Yes

I_ERFMG_OLD - Quantity in Unit of Entry

Data type: RESBD-ERFMG
Optional: No
Call by Reference: Yes

I_MATNR_OLD - Material Number

Data type: RESBD-MATNR
Optional: No
Call by Reference: Yes

I_WERKS_OLD - Plant

Data type: RESBD-WERKS
Optional: No
Call by Reference: Yes

I_CHARG_OLD - Batch Number

Data type: RESBD-CHARG
Optional: No
Call by Reference: Yes

EXPORTING Parameters details for COS6_MENGE_TO_BDMNG

E_MENGE - Requirement quantity of the component

Data type: RESBD-MENGE
Optional: No
Call by Reference: Yes

E_ROANZ - Number of Variable-Size Items

Data type: RESBD-ROANZ
Optional: No
Call by Reference: Yes

E_ESMNG - Usage quantity per order unit of measure

Data type: RESBD-ESMNG
Optional: No
Call by Reference: Yes

E_BWART - Movement Type (Inventory Management)

Data type: RESBD-BWART
Optional: No
Call by Reference: Yes

E_SHKZG - Debit/Credit Indicator

Data type: RESBD-SHKZG
Optional: No
Call by Reference: Yes

E_EINHEIT - Base Unit of Measure

Data type: RESBD-EINHEIT
Optional: No
Call by Reference: Yes

E_NOMNG - Input Quantity

Data type: RESBD-NOMNG
Optional: No
Call by Reference: Yes

E_BDMNG - Requirement Quantity

Data type: RESBD-BDMNG
Optional: No
Call by Reference: Yes

E_MEINS - Base Unit of Measure

Data type: RESBD-MEINS
Optional: No
Call by Reference: Yes

E_ERFMG - Quantity in Unit of Entry

Data type: RESBD-ERFMG
Optional: No
Call by Reference: Yes

E_ERFME - Unit of Entry

Data type: RESBD-ERFME
Optional: No
Call by Reference: Yes

E_UMREN - Denominator for conversion to base units of measure

Data type: RESBD-UMREN
Optional: No
Call by Reference: Yes

E_UMREZ - Numerator for Conversion to Base Units of Measure

Data type: RESBD-UMREZ
Optional: No
Call by Reference: Yes

EXCEPTIONS details

NEGATIVE_PLAN_IND_REQ -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NEGATIVE_QUAN_NON_STOCK -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NEGATIVE_QUAN_COPRODUCT -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

CONVERSION_NOT_POSSIBLE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

POPUP_CANCELED -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ORIGINAL_QUAN_TOO_SMALL -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for COS6_MENGE_TO_BDMNG 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_e_menge  TYPE RESBD-MENGE, "   
lv_is_resbd  TYPE RESBD, "   
lv_negative_plan_ind_req  TYPE RESBD, "   
lv_e_roanz  TYPE RESBD-ROANZ, "   
lv_i_umrez_old  TYPE RESBD-UMREZ, "   
lv_e_esmng  TYPE RESBD-ESMNG, "   
lv_i_umren_old  TYPE RESBD-UMREN, "   
lv_e_bwart  TYPE RESBD-BWART, "   
lv_i_dumps_old  TYPE RESBD-DUMPS, "   
lv_e_shkzg  TYPE RESBD-SHKZG, "   
lv_i_ewahr_old  TYPE RESBD-EWAHR, "   
lv_i_roanz_old  TYPE RESBD-ROANZ, "   
lv_i_msfcv_meins  TYPE MSFCV-MEINS, "   
lv_i_msfcv_ausme  TYPE MSFCV-AUSME, "   
lv_i_aufnr  TYPE CAUFVD-AUFNR, "   
lv_i_autyp  TYPE CAUFVD-AUTYP, "   
lv_i_gamng  TYPE CAUFVD-GAMNG, "   
lv_e_einheit  TYPE RESBD-EINHEIT, "   
lv_i_menge_old  TYPE RESBD-MENGE, "   
lv_negative_quan_non_stock  TYPE RESBD, "   
lv_i_aktyp  TYPE RC27S-AKTYP, "   
lv_i_flg_no_dialog  TYPE RC27X-FLG_SEL, "   
lv_i_flg_insr_with_ref  TYPE RC27X-FLG_SEL, "   SPACE
lv_e_nomng  TYPE RESBD-NOMNG, "   
lv_i_bdmng_old  TYPE RESBD-BDMNG, "   
lv_negative_quan_coproduct  TYPE RESBD, "   
lv_e_bdmng  TYPE RESBD-BDMNG, "   
lv_i_nomng_old  TYPE RESBD-NOMNG, "   
lv_conversion_not_possible  TYPE RESBD, "   
lv_e_meins  TYPE RESBD-MEINS, "   
lv_i_einheit_old  TYPE RESBD-EINHEIT, "   
lv_popup_canceled  TYPE RESBD, "   
lv_e_erfmg  TYPE RESBD-ERFMG, "   
lv_i_erfmg_old  TYPE RESBD-ERFMG, "   
lv_original_quan_too_small  TYPE RESBD, "   
lv_e_erfme  TYPE RESBD-ERFME, "   
lv_i_matnr_old  TYPE RESBD-MATNR, "   
lv_e_umren  TYPE RESBD-UMREN, "   
lv_i_werks_old  TYPE RESBD-WERKS, "   
lv_e_umrez  TYPE RESBD-UMREZ, "   
lv_i_charg_old  TYPE RESBD-CHARG. "   

  CALL FUNCTION 'COS6_MENGE_TO_BDMNG'  "NOTRANSL: Konvertierung von MENGE in BDMNG und andere Mengenfelder
    EXPORTING
         IS_RESBD = lv_is_resbd
         I_UMREZ_OLD = lv_i_umrez_old
         I_UMREN_OLD = lv_i_umren_old
         I_DUMPS_OLD = lv_i_dumps_old
         I_EWAHR_OLD = lv_i_ewahr_old
         I_ROANZ_OLD = lv_i_roanz_old
         I_MSFCV_MEINS = lv_i_msfcv_meins
         I_MSFCV_AUSME = lv_i_msfcv_ausme
         I_AUFNR = lv_i_aufnr
         I_AUTYP = lv_i_autyp
         I_GAMNG = lv_i_gamng
         I_MENGE_OLD = lv_i_menge_old
         I_AKTYP = lv_i_aktyp
         I_FLG_NO_DIALOG = lv_i_flg_no_dialog
         I_FLG_INSR_WITH_REF = lv_i_flg_insr_with_ref
         I_BDMNG_OLD = lv_i_bdmng_old
         I_NOMNG_OLD = lv_i_nomng_old
         I_EINHEIT_OLD = lv_i_einheit_old
         I_ERFMG_OLD = lv_i_erfmg_old
         I_MATNR_OLD = lv_i_matnr_old
         I_WERKS_OLD = lv_i_werks_old
         I_CHARG_OLD = lv_i_charg_old
    IMPORTING
         E_MENGE = lv_e_menge
         E_ROANZ = lv_e_roanz
         E_ESMNG = lv_e_esmng
         E_BWART = lv_e_bwart
         E_SHKZG = lv_e_shkzg
         E_EINHEIT = lv_e_einheit
         E_NOMNG = lv_e_nomng
         E_BDMNG = lv_e_bdmng
         E_MEINS = lv_e_meins
         E_ERFMG = lv_e_erfmg
         E_ERFME = lv_e_erfme
         E_UMREN = lv_e_umren
         E_UMREZ = lv_e_umrez
    EXCEPTIONS
        NEGATIVE_PLAN_IND_REQ = 1
        NEGATIVE_QUAN_NON_STOCK = 2
        NEGATIVE_QUAN_COPRODUCT = 3
        CONVERSION_NOT_POSSIBLE = 4
        POPUP_CANCELED = 5
        ORIGINAL_QUAN_TOO_SMALL = 6
. " COS6_MENGE_TO_BDMNG




ABAP code using 7.40 inline data declarations to call FM COS6_MENGE_TO_BDMNG

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 MENGE FROM RESBD INTO @DATA(ld_e_menge).
 
 
 
"SELECT single ROANZ FROM RESBD INTO @DATA(ld_e_roanz).
 
"SELECT single UMREZ FROM RESBD INTO @DATA(ld_i_umrez_old).
 
"SELECT single ESMNG FROM RESBD INTO @DATA(ld_e_esmng).
 
"SELECT single UMREN FROM RESBD INTO @DATA(ld_i_umren_old).
 
"SELECT single BWART FROM RESBD INTO @DATA(ld_e_bwart).
 
"SELECT single DUMPS FROM RESBD INTO @DATA(ld_i_dumps_old).
 
"SELECT single SHKZG FROM RESBD INTO @DATA(ld_e_shkzg).
 
"SELECT single EWAHR FROM RESBD INTO @DATA(ld_i_ewahr_old).
 
"SELECT single ROANZ FROM RESBD INTO @DATA(ld_i_roanz_old).
 
"SELECT single MEINS FROM MSFCV INTO @DATA(ld_i_msfcv_meins).
 
"SELECT single AUSME FROM MSFCV INTO @DATA(ld_i_msfcv_ausme).
 
"SELECT single AUFNR FROM CAUFVD INTO @DATA(ld_i_aufnr).
 
"SELECT single AUTYP FROM CAUFVD INTO @DATA(ld_i_autyp).
 
"SELECT single GAMNG FROM CAUFVD INTO @DATA(ld_i_gamng).
 
"SELECT single EINHEIT FROM RESBD INTO @DATA(ld_e_einheit).
 
"SELECT single MENGE FROM RESBD INTO @DATA(ld_i_menge_old).
 
 
"SELECT single AKTYP FROM RC27S INTO @DATA(ld_i_aktyp).
 
"SELECT single FLG_SEL FROM RC27X INTO @DATA(ld_i_flg_no_dialog).
 
"SELECT single FLG_SEL FROM RC27X INTO @DATA(ld_i_flg_insr_with_ref).
DATA(ld_i_flg_insr_with_ref) = ' '.
 
"SELECT single NOMNG FROM RESBD INTO @DATA(ld_e_nomng).
 
"SELECT single BDMNG FROM RESBD INTO @DATA(ld_i_bdmng_old).
 
 
"SELECT single BDMNG FROM RESBD INTO @DATA(ld_e_bdmng).
 
"SELECT single NOMNG FROM RESBD INTO @DATA(ld_i_nomng_old).
 
 
"SELECT single MEINS FROM RESBD INTO @DATA(ld_e_meins).
 
"SELECT single EINHEIT FROM RESBD INTO @DATA(ld_i_einheit_old).
 
 
"SELECT single ERFMG FROM RESBD INTO @DATA(ld_e_erfmg).
 
"SELECT single ERFMG FROM RESBD INTO @DATA(ld_i_erfmg_old).
 
 
"SELECT single ERFME FROM RESBD INTO @DATA(ld_e_erfme).
 
"SELECT single MATNR FROM RESBD INTO @DATA(ld_i_matnr_old).
 
"SELECT single UMREN FROM RESBD INTO @DATA(ld_e_umren).
 
"SELECT single WERKS FROM RESBD INTO @DATA(ld_i_werks_old).
 
"SELECT single UMREZ FROM RESBD INTO @DATA(ld_e_umrez).
 
"SELECT single CHARG FROM RESBD INTO @DATA(ld_i_charg_old).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!