SAP RK_REPORT_INSERT Function Module for writes generated coding in report









RK_REPORT_INSERT is a standard rk report insert SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for writes generated coding in report 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 rk report insert FM, simply by entering the name RK_REPORT_INSERT into the relevant SAP transaction such as SE37 or SE38.

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



Function RK_REPORT_INSERT 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_REPORT_INSERT'"writes generated coding in report
EXPORTING
RDIR = "RDIR entry for report
* SYNTAX_CHECK_ON = "

IMPORTING
MESSAGE_TEXT = "
LINE_NO = "
WRONG_WORD = "
INCLUDE_NAME = "
ERROR_OCCURED = "
.



IMPORTING Parameters details for RK_REPORT_INSERT

RDIR - RDIR entry for report

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

SYNTAX_CHECK_ON -

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

EXPORTING Parameters details for RK_REPORT_INSERT

MESSAGE_TEXT -

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

LINE_NO -

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

WRONG_WORD -

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

INCLUDE_NAME -

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

ERROR_OCCURED -

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

Copy and paste ABAP code example for RK_REPORT_INSERT 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_rdir  TYPE TRDIR, "   
lv_message_text  TYPE SY-MSGLI, "   
lv_line_no  TYPE SY-TABIX, "   
lv_syntax_check_on  TYPE SY-BINPT, "   
lv_wrong_word  TYPE SY-MSGLI, "   
lv_include_name  TYPE SY-REPID, "   
lv_error_occured  TYPE SY-BATCH. "   

  CALL FUNCTION 'RK_REPORT_INSERT'  "writes generated coding in report
    EXPORTING
         RDIR = lv_rdir
         SYNTAX_CHECK_ON = lv_syntax_check_on
    IMPORTING
         MESSAGE_TEXT = lv_message_text
         LINE_NO = lv_line_no
         WRONG_WORD = lv_wrong_word
         INCLUDE_NAME = lv_include_name
         ERROR_OCCURED = lv_error_occured
. " RK_REPORT_INSERT




ABAP code using 7.40 inline data declarations to call FM RK_REPORT_INSERT

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 MSGLI FROM SY INTO @DATA(ld_message_text).
 
"SELECT single TABIX FROM SY INTO @DATA(ld_line_no).
 
"SELECT single BINPT FROM SY INTO @DATA(ld_syntax_check_on).
 
"SELECT single MSGLI FROM SY INTO @DATA(ld_wrong_word).
 
"SELECT single REPID FROM SY INTO @DATA(ld_include_name).
 
"SELECT single BATCH FROM SY INTO @DATA(ld_error_occured).
 


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!