SAP KEYRATIO_PROCESS Function Module for









KEYRATIO_PROCESS is a standard keyratio process 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 keyratio process FM, simply by entering the name KEYRATIO_PROCESS into the relevant SAP transaction such as SE37 or SE38.

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



Function KEYRATIO_PROCESS 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 'KEYRATIO_PROCESS'"
EXPORTING
* ALLOW_VARIABLES = '1' "'1' variables are allowed , '0' not allowed..
APPLCLASS = "Application class
* COL = 6 "Starting column
* DISP_KEYRA = ' ' "Key figure display if 'X', otherwise edit
KEYRA = "Key figure
* ROW = 4 "Starting line
* WTITLE = ' ' "Window title
* F1FIELD = 'FLINE' "
* F1TAB = 'CFFTB' "

IMPORTING
FORML_TYPE = "Complexity of formula 0 / 1 / 2 (see documentation)

TABLES
FORML_TAB = "Table with formulas
OPR_TAB = "Table with valid operators
VALFLDE_TAB = "Table with valid identifiers

EXCEPTIONS
ABORT = 1 RATIO_EMPTY = 2
.



IMPORTING Parameters details for KEYRATIO_PROCESS

ALLOW_VARIABLES - '1' variables are allowed , '0' not allowed..

Data type:
Default: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)

APPLCLASS - Application class

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

COL - Starting column

Data type: SY-CUCOL
Default: 6
Optional: Yes
Call by Reference: No ( called with pass by value option)

DISP_KEYRA - Key figure display if 'X', otherwise edit

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

KEYRA - Key figure

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

ROW - Starting line

Data type: SY-CUROW
Default: 4
Optional: Yes
Call by Reference: No ( called with pass by value option)

WTITLE - Window title

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

F1FIELD -

Data type: HELP_INFO-FIELDNAME
Default: 'FLINE'
Optional: Yes
Call by Reference: No ( called with pass by value option)

F1TAB -

Data type: HELP_INFO-TABNAME
Default: 'CFFTB'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for KEYRATIO_PROCESS

FORML_TYPE - Complexity of formula 0 / 1 / 2 (see documentation)

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

TABLES Parameters details for KEYRATIO_PROCESS

FORML_TAB - Table with formulas

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

OPR_TAB - Table with valid operators

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

VALFLDE_TAB - Table with valid identifiers

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

EXCEPTIONS details

ABORT - Abnormal termination of processing by the user

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

RATIO_EMPTY -

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

Copy and paste ABAP code example for KEYRATIO_PROCESS 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_abort  TYPE STRING, "   
lt_forml_tab  TYPE STANDARD TABLE OF CFFTB, "   
lv_forml_type  TYPE CFFTB, "   
lv_allow_variables  TYPE CFFTB, "   '1'
lt_opr_tab  TYPE STANDARD TABLE OF TKCKO, "   
lv_applclass  TYPE TKCKO, "   
lv_ratio_empty  TYPE TKCKO, "   
lv_col  TYPE SY-CUCOL, "   6
lt_valflde_tab  TYPE STANDARD TABLE OF CFFLDE, "   
lv_disp_keyra  TYPE CFFLDE, "   SPACE
lv_keyra  TYPE TKCK-KEYRA, "   
lv_row  TYPE SY-CUROW, "   4
lv_wtitle  TYPE SY, "   SPACE
lv_f1field  TYPE HELP_INFO-FIELDNAME, "   'FLINE'
lv_f1tab  TYPE HELP_INFO-TABNAME. "   'CFFTB'

  CALL FUNCTION 'KEYRATIO_PROCESS'  "
    EXPORTING
         ALLOW_VARIABLES = lv_allow_variables
         APPLCLASS = lv_applclass
         COL = lv_col
         DISP_KEYRA = lv_disp_keyra
         KEYRA = lv_keyra
         ROW = lv_row
         WTITLE = lv_wtitle
         F1FIELD = lv_f1field
         F1TAB = lv_f1tab
    IMPORTING
         FORML_TYPE = lv_forml_type
    TABLES
         FORML_TAB = lt_forml_tab
         OPR_TAB = lt_opr_tab
         VALFLDE_TAB = lt_valflde_tab
    EXCEPTIONS
        ABORT = 1
        RATIO_EMPTY = 2
. " KEYRATIO_PROCESS




ABAP code using 7.40 inline data declarations to call FM KEYRATIO_PROCESS

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.

 
 
 
DATA(ld_allow_variables) = '1'.
 
 
 
 
"SELECT single CUCOL FROM SY INTO @DATA(ld_col).
DATA(ld_col) = 6.
 
 
DATA(ld_disp_keyra) = ' '.
 
"SELECT single KEYRA FROM TKCK INTO @DATA(ld_keyra).
 
"SELECT single CUROW FROM SY INTO @DATA(ld_row).
DATA(ld_row) = 4.
 
DATA(ld_wtitle) = ' '.
 
"SELECT single FIELDNAME FROM HELP_INFO INTO @DATA(ld_f1field).
DATA(ld_f1field) = 'FLINE'.
 
"SELECT single TABNAME FROM HELP_INFO INTO @DATA(ld_f1tab).
DATA(ld_f1tab) = 'CFFTB'.
 


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!