Skip to Content
Author's profile photo Former Member

Keywords for creating Reports Dynamically

Here we will set visit a set of ABAP keywords which will help you to create a ABAP Report dynamically.

READ REPORT

This keyword will help you to read a existing Report name into a internal table.

Syntax:

DATA: IT_REPORT TYPE TABLE OF string.

READ REPORT ‘REPORT NAME’ INTO IT_REPORT.

You can add few lines to this table or you can create a new report from scratch.

Once you have the table IT_REPORT filled with the program lines, we need to make sure whether any Syntax error exist or not.

SYNTAX-CHECK FOR

SYNTAX-CHECK FOR IT_REPORT.

MESSAGE  err_msg

LINE   line_no

WORD err_word.

If the internal table contains syntax errors, the first message is assigned to variable err_msg, the corresponding error line assigned to variable line_no(TYPE I) and the first defective token is assigned to variable err_word.

INSERT REPORT

For creating a new report we use the INSERT REPORT Keyword.

INSERT REPORT ‘Report Name’ FROM IT_REPORT.

We can also read Text elements of a program using READ TEXTPOOL and create new texts using INSERT TEXTPOOL keywords.

READ TEXTPOOL ‘ReportName’ INTO IT_POOL LANGUAGE sy-langu.

INSERT TEXTPOOL ‘ReportName’ FROM IT_POOL LANGUAGE sy-langu

IT_POOL is an internal table of structure textpool.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.