SAP FRML958_UNIT_CONVERSION Function Module for RMS-FRM:









FRML958_UNIT_CONVERSION is a standard frml958 unit conversion SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for RMS-FRM: 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 frml958 unit conversion FM, simply by entering the name FRML958_UNIT_CONVERSION into the relevant SAP transaction such as SE37 or SE38.

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



Function FRML958_UNIT_CONVERSION 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 'FRML958_UNIT_CONVERSION'"RMS-FRM:
EXPORTING
I_MATNR = "Material Number
I_QTY_IN = "DE-EN-LANG-SWITCH-NO-TRANSLATION
I_UNIT_IN = "Unit of Measure
I_UNIT_OUT = "Unit of Measure

IMPORTING
E_QTY_OUT = "DE-EN-LANG-SWITCH-NO-TRANSLATION

EXCEPTIONS
MATERIAL_NOT_VALID = 1 INTERNAL_ERROR = 2 INPUT_UNIT_NOT_VALID = 3 OUTPUT_UNIT_NOT_VALID = 4
.



IMPORTING Parameters details for FRML958_UNIT_CONVERSION

I_MATNR - Material Number

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

I_QTY_IN - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

I_UNIT_IN - Unit of Measure

Data type: T006-MSEHI
Optional: No
Call by Reference: Yes

I_UNIT_OUT - Unit of Measure

Data type: T006-MSEHI
Optional: No
Call by Reference: Yes

EXPORTING Parameters details for FRML958_UNIT_CONVERSION

E_QTY_OUT - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

EXCEPTIONS details

MATERIAL_NOT_VALID - Material does not exist

Data type:
Optional: No
Call by Reference: Yes

INTERNAL_ERROR -

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

Copy and paste ABAP code example for FRML958_UNIT_CONVERSION 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 MATNR, "   
lv_e_qty_out  TYPE FRMLE_QTY_CONV, "   
lv_material_not_valid  TYPE FRMLE_QTY_CONV, "   
lv_i_qty_in  TYPE FRMLE_QTY_CONV, "   
lv_internal_error  TYPE FRMLE_QTY_CONV, "   
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. "   

  CALL FUNCTION 'FRML958_UNIT_CONVERSION'  "RMS-FRM:
    EXPORTING
         I_MATNR = lv_i_matnr
         I_QTY_IN = lv_i_qty_in
         I_UNIT_IN = lv_i_unit_in
         I_UNIT_OUT = lv_i_unit_out
    IMPORTING
         E_QTY_OUT = lv_e_qty_out
    EXCEPTIONS
        MATERIAL_NOT_VALID = 1
        INTERNAL_ERROR = 2
        INPUT_UNIT_NOT_VALID = 3
        OUTPUT_UNIT_NOT_VALID = 4
. " FRML958_UNIT_CONVERSION




ABAP code using 7.40 inline data declarations to call FM FRML958_UNIT_CONVERSION

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 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



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!