SAP FRML142_UNIT_CONVERSION_EXT Function Module for NOTRANSL: RMS-FRM: Konvertierung Mengeneinheit Material
FRML142_UNIT_CONVERSION_EXT is a standard frml142 unit conversion ext 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: RMS-FRM: Konvertierung Mengeneinheit Material 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 frml142 unit conversion ext FM, simply by entering the name FRML142_UNIT_CONVERSION_EXT into the relevant SAP transaction such as SE37 or SE38.
Function Group: FRML142
Program Name: SAPLFRML142
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FRML142_UNIT_CONVERSION_EXT 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 'FRML142_UNIT_CONVERSION_EXT'"NOTRANSL: RMS-FRM: Konvertierung Mengeneinheit Material.
EXPORTING
I_MATNR = "Material Number
I_QUANTITY_IN = "Quantity of a Material or Substance Item
I_UNIT_IN = "Unit of Measure
I_UNIT_OUT = "Unit of Measure
IMPORTING
E_QUANTITY_OUT = "Quantity of a Material or Substance Item
EXCEPTIONS
CONVERSION_NOT_FOUND = 1 MATERIAL_NOT_VALID = 2 INPUT_UNIT_NOT_VALID = 3 OUTPUT_UNIT_NOT_VALID = 4 INTERNAL_ERROR = 5
IMPORTING Parameters details for FRML142_UNIT_CONVERSION_EXT
I_MATNR - Material Number
Data type: MARA-MATNROptional: No
Call by Reference: No ( called with pass by value option)
I_QUANTITY_IN - Quantity of a Material or Substance Item
Data type: FRMLE_COMPTGTOptional: No
Call by Reference: No ( called with pass by value option)
I_UNIT_IN - Unit of Measure
Data type: T006-MSEHIOptional: No
Call by Reference: No ( called with pass by value option)
I_UNIT_OUT - Unit of Measure
Data type: T006-MSEHIOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for FRML142_UNIT_CONVERSION_EXT
E_QUANTITY_OUT - Quantity of a Material or Substance Item
Data type: FRMLE_COMPTGTOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CONVERSION_NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
MATERIAL_NOT_VALID -
Data type:Optional: No
Call by Reference: Yes
INPUT_UNIT_NOT_VALID -
Data type:Optional: No
Call by Reference: Yes
OUTPUT_UNIT_NOT_VALID -
Data type:Optional: No
Call by Reference: Yes
INTERNAL_ERROR -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for FRML142_UNIT_CONVERSION_EXT 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_matnr | TYPE MARA-MATNR, " | |||
| lv_e_quantity_out | TYPE FRMLE_COMPTGT, " | |||
| lv_conversion_not_found | TYPE FRMLE_COMPTGT, " | |||
| lv_i_quantity_in | TYPE FRMLE_COMPTGT, " | |||
| lv_material_not_valid | TYPE FRMLE_COMPTGT, " | |||
| lv_i_unit_in | TYPE T006-MSEHI, " | |||
| lv_input_unit_not_valid | TYPE T006, " | |||
| lv_i_unit_out | TYPE T006-MSEHI, " | |||
| lv_output_unit_not_valid | TYPE T006, " | |||
| lv_internal_error | TYPE T006. " |
|   CALL FUNCTION 'FRML142_UNIT_CONVERSION_EXT' "NOTRANSL: RMS-FRM: Konvertierung Mengeneinheit Material |
| EXPORTING | ||
| I_MATNR | = lv_i_matnr | |
| I_QUANTITY_IN | = lv_i_quantity_in | |
| I_UNIT_IN | = lv_i_unit_in | |
| I_UNIT_OUT | = lv_i_unit_out | |
| IMPORTING | ||
| E_QUANTITY_OUT | = lv_e_quantity_out | |
| EXCEPTIONS | ||
| CONVERSION_NOT_FOUND = 1 | ||
| MATERIAL_NOT_VALID = 2 | ||
| INPUT_UNIT_NOT_VALID = 3 | ||
| OUTPUT_UNIT_NOT_VALID = 4 | ||
| INTERNAL_ERROR = 5 | ||
| . " FRML142_UNIT_CONVERSION_EXT | ||
ABAP code using 7.40 inline data declarations to call FM FRML142_UNIT_CONVERSION_EXT
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_i_matnr). | ||||
| "SELECT single MSEHI FROM T006 INTO @DATA(ld_i_unit_in). | ||||
| "SELECT single MSEHI FROM T006 INTO @DATA(ld_i_unit_out). | ||||
Search for further information about these or an SAP related objects