SAP J_3G_MENGE_IN_BASIS_ME Function Module for Convert Quantity to Appropriate Quantity in Base Unit of Measure
J_3G_MENGE_IN_BASIS_ME is a standard j 3g menge in basis me SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Convert Quantity to Appropriate Quantity in Base Unit of Measure 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 j 3g menge in basis me FM, simply by entering the name J_3G_MENGE_IN_BASIS_ME into the relevant SAP transaction such as SE37 or SE38.
Function Group: J3GA
Program Name: SAPLJ3GA
Main Program: SAPLJ3GA
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function J_3G_MENGE_IN_BASIS_ME 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 'J_3G_MENGE_IN_BASIS_ME'"Convert Quantity to Appropriate Quantity in Base Unit of Measure.
EXPORTING
I_MATNR = "Material Number
I_MEINS = "Unit of Measure
I_MENGE = "Quantity
IMPORTING
E_MENGE = "Output Quantity
EXCEPTIONS
UNIT_FAULT = 1
IMPORTING Parameters details for J_3G_MENGE_IN_BASIS_ME
I_MATNR - Material Number
Data type: MARA-MATNROptional: No
Call by Reference: No ( called with pass by value option)
I_MEINS - Unit of Measure
Data type: MARA-MEINSOptional: No
Call by Reference: No ( called with pass by value option)
I_MENGE - Quantity
Data type: J_3GBELP-J_3GMENGEOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for J_3G_MENGE_IN_BASIS_ME
E_MENGE - Output Quantity
Data type: J_3GBELP-J_3GMENGEOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
UNIT_FAULT - Error During Conversion of Units of Measure
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for J_3G_MENGE_IN_BASIS_ME 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 J_3GBELP-J_3GMENGE, " | |||
| lv_i_matnr | TYPE MARA-MATNR, " | |||
| lv_unit_fault | TYPE MARA, " | |||
| lv_i_meins | TYPE MARA-MEINS, " | |||
| lv_i_menge | TYPE J_3GBELP-J_3GMENGE. " |
|   CALL FUNCTION 'J_3G_MENGE_IN_BASIS_ME' "Convert Quantity to Appropriate Quantity in Base Unit of Measure |
| EXPORTING | ||
| I_MATNR | = lv_i_matnr | |
| I_MEINS | = lv_i_meins | |
| I_MENGE | = lv_i_menge | |
| IMPORTING | ||
| E_MENGE | = lv_e_menge | |
| EXCEPTIONS | ||
| UNIT_FAULT = 1 | ||
| . " J_3G_MENGE_IN_BASIS_ME | ||
ABAP code using 7.40 inline data declarations to call FM J_3G_MENGE_IN_BASIS_ME
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 J_3GMENGE FROM J_3GBELP INTO @DATA(ld_e_menge). | ||||
| "SELECT single MATNR FROM MARA INTO @DATA(ld_i_matnr). | ||||
| "SELECT single MEINS FROM MARA INTO @DATA(ld_i_meins). | ||||
| "SELECT single J_3GMENGE FROM J_3GBELP INTO @DATA(ld_i_menge). | ||||
Search for further information about these or an SAP related objects