SAP RK_RATIO_CHECK Function Module for









RK_RATIO_CHECK is a standard rk ratio check SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 rk ratio check FM, simply by entering the name RK_RATIO_CHECK into the relevant SAP transaction such as SE37 or SE38.

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



Function RK_RATIO_CHECK 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 'RK_RATIO_CHECK'"
EXPORTING
I_KOKRS = "Controlling Area
I_STAGR = "Statistical Key Figure
* I_SPRAS = "Language Key
* I_OBJNR = "Object Number
I_GJAHR = "Fiscal Year
I_MEINB = "Unit for statistical key figure
* I_QUANTITY = "Statistical quantity
* I_VRGNG = "CO business transaction

IMPORTING
E_BEZEI = "Long Text
E_GRTYP = "Statistical Key Figure Category
E_STRUCT = "Generated DDIC table for LIS, conditions, messages
E_KENNZ = "Key Figure from LIS
E_MEINB = "Unit for statistical key figure
E_QUANTITY = "Statistical quantity
E_WARNING_OCCURRED = "Warning Message Occurred

EXCEPTIONS
NOT_FOUND = 1 NOT_COMPLETE = 2 WRONG_UNIT = 3
.



IMPORTING Parameters details for RK_RATIO_CHECK

I_KOKRS - Controlling Area

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

I_STAGR - Statistical Key Figure

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

I_SPRAS - Language Key

Data type: TKT03-SPRAS
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_OBJNR - Object Number

Data type: IONRA-OBJNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_GJAHR - Fiscal Year

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

I_MEINB - Unit for statistical key figure

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

I_QUANTITY - Statistical quantity

Data type: COEPR-SMEBTR
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_VRGNG - CO business transaction

Data type: CO_VORGANG
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for RK_RATIO_CHECK

E_BEZEI - Long Text

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

E_GRTYP - Statistical Key Figure Category

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

E_STRUCT - Generated DDIC table for LIS, conditions, messages

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

E_KENNZ - Key Figure from LIS

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

E_MEINB - Unit for statistical key figure

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

E_QUANTITY - Statistical quantity

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

E_WARNING_OCCURRED - Warning Message Occurred

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

EXCEPTIONS details

NOT_FOUND -

Data type:
Optional: No
Call by Reference: Yes

NOT_COMPLETE - Incomplete

Data type:
Optional: No
Call by Reference: Yes

WRONG_UNIT -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for RK_RATIO_CHECK 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_bezei  TYPE TKT03-BEZEI, "   
lv_i_kokrs  TYPE TKA03-KOKRS, "   
lv_not_found  TYPE TKA03, "   
lv_e_grtyp  TYPE TKA03-GRTYP, "   
lv_i_stagr  TYPE TKA03-STAGR, "   
lv_not_complete  TYPE TKA03, "   
lv_i_spras  TYPE TKT03-SPRAS, "   
lv_e_struct  TYPE TKA03-STRUCT, "   
lv_wrong_unit  TYPE TKA03, "   
lv_e_kennz  TYPE TKA03-KENNZ, "   
lv_i_objnr  TYPE IONRA-OBJNR, "   
lv_e_meinb  TYPE TKA03-MSEHI, "   
lv_i_gjahr  TYPE GJAHR, "   
lv_i_meinb  TYPE TKA03-MSEHI, "   
lv_e_quantity  TYPE COEPR-SMEBTR, "   
lv_i_quantity  TYPE COEPR-SMEBTR, "   
lv_e_warning_occurred  TYPE BOOLE_D, "   
lv_i_vrgng  TYPE CO_VORGANG. "   

  CALL FUNCTION 'RK_RATIO_CHECK'  "
    EXPORTING
         I_KOKRS = lv_i_kokrs
         I_STAGR = lv_i_stagr
         I_SPRAS = lv_i_spras
         I_OBJNR = lv_i_objnr
         I_GJAHR = lv_i_gjahr
         I_MEINB = lv_i_meinb
         I_QUANTITY = lv_i_quantity
         I_VRGNG = lv_i_vrgng
    IMPORTING
         E_BEZEI = lv_e_bezei
         E_GRTYP = lv_e_grtyp
         E_STRUCT = lv_e_struct
         E_KENNZ = lv_e_kennz
         E_MEINB = lv_e_meinb
         E_QUANTITY = lv_e_quantity
         E_WARNING_OCCURRED = lv_e_warning_occurred
    EXCEPTIONS
        NOT_FOUND = 1
        NOT_COMPLETE = 2
        WRONG_UNIT = 3
. " RK_RATIO_CHECK




ABAP code using 7.40 inline data declarations to call FM RK_RATIO_CHECK

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 BEZEI FROM TKT03 INTO @DATA(ld_e_bezei).
 
"SELECT single KOKRS FROM TKA03 INTO @DATA(ld_i_kokrs).
 
 
"SELECT single GRTYP FROM TKA03 INTO @DATA(ld_e_grtyp).
 
"SELECT single STAGR FROM TKA03 INTO @DATA(ld_i_stagr).
 
 
"SELECT single SPRAS FROM TKT03 INTO @DATA(ld_i_spras).
 
"SELECT single STRUCT FROM TKA03 INTO @DATA(ld_e_struct).
 
 
"SELECT single KENNZ FROM TKA03 INTO @DATA(ld_e_kennz).
 
"SELECT single OBJNR FROM IONRA INTO @DATA(ld_i_objnr).
 
"SELECT single MSEHI FROM TKA03 INTO @DATA(ld_e_meinb).
 
 
"SELECT single MSEHI FROM TKA03 INTO @DATA(ld_i_meinb).
 
"SELECT single SMEBTR FROM COEPR INTO @DATA(ld_e_quantity).
 
"SELECT single SMEBTR FROM COEPR INTO @DATA(ld_i_quantity).
 
 
 


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!