Skip to Content
Technical Articles

Enhance Your Documentation with SAP Controls Report Simulator

h3. Summary

This blog describes a custom ABAP program -+ Report Simulator+ – that simulates simple SAP Controls based reports from a text files containing column headers and sample data. The report column headers and sample data can be delimited by TAB character or any other delimiter except colon character; e.g., comma, semicolon, space, …

With the+ SAP Controls Report Simulator, the functional consultants could design report layouts in matter of minutes and include their screen prints in functional specification to make it look professionally. Presenting the exact screen layouts for reports in FS documents could greatly help technical consultants when implementing them. The report layouts may use SAP Picture control to include; e.g., company logo, SAP Dynamic Document component to display; e.g., report parameters and ALV Grid control to display sample data.</p><p style=”margin: 6pt 0in 0pt” class=”MsoNormal”>The follow up blog “Rapid ABAP Development with Report Simulator+” to be published the near future will show how to expand simulated report screens into fully functional reports by programming only data retrieval and optional event handling procedures.</p> For information on ABAP source code of the Report Simulator refer to the end of this blog h3. Adding Report Layout to Functional Specification with Report Simulator

The ABAP report implementation process starts with blueprinting and development of functional specification document. The FS document describes the business process, discusses how and where to retrieve data from. It also provides the information about output format. Often the output layout is prepared using MS Excel spreadsheet or other desktop software that is not appropriate for the task. Sometimes parts of screens form other SAP applications are cut and pasted to show what is expected. Usually, the effect of these attempts is poor quality representation of what is expected in a final report.

A custom SAP Controls Report Simulator program was developed to help functional consultants to deal with this problem. In matter of minutes without any programming, a functional consultant could create an exact representation of report output screen and include it in Functional Specification document.

The SAP Controls Report Simulator selection screen looks as follows:

The program accepts, as Simulation Data File Path parameter, the path to a delimited text file that contains sample report data with the first row representing column headers. A Field Delimiter selection screen parameter should contain a TAB for TAB delimited text files, one character delimiter; e.g., a comma, a semicolon,,, to be used as a column separator or left empty for SPACE delimited text file. A colon character should not be used as a delimiter. Its use is reserved for formatting column data.

Additionally a full path to a text file with information to be displayed in a panel above report tabular data may be provided in Simulation Header File Path parameter. The Picture Id parameter may contain URL to JPEG picture stored in MIME repository in SE80 workbench. If specified, the JPEG file will be displayed in upper left corner of the report screen. The +Picture Width and Picture Height +parameters provide percentage based dimensions of the panel were JPEG picture will be displayed; e.g., 12% width and 10% height. Enter 0 for width and/or height if you want to display ALV grid only.

On the selection screen you could enter a report title and check or uncheck several report layout self explanatory controlling parameters. You could also specify toolbar buttons if different than default ALV Grid toolbar buttons should be used.

Once you enter appropriate selection screen parameters, click on EXECUTE button and the report simulation screen will appear as defined by information in a sample text file:


The report simulation will look exactly the same as the final report. To help technical consultant, the last row of report may contain column data dictionary specification as shown on the screen above.

The above report was generated from the following header file and semi-colon delimited data file:

The first line of the file was used for displaying column headers and formatting columns data. The last line that contains field types to be used by technical consultants when programming report.

Once you decide on the final format of the report by changing its sample data file, you could cut and paste its simulation screen to your Functional Specification document as shown on the following screen:

As you can see, it is very easy to do and you can get exact representation of report output screen in few minutes greatly enhancing your documentation.

Defining Toolbar

You could define ALV Grid toolbar buttons on the selection screen:

To define standard buttons, use the following commands:

TOOLBAR EXCLUDE ALL – to exclude all standard buttons0.1.

TOOLBAR INCLUDE SELECTED – to specify selected standard buttons0.1.

TOOLBAR INCLUDE  &FIND – to include standard FIND button where &FIND is the FIND button FCODE as found in attributes of CL_GUI_ALV_GRIS ABAP class in SE24The sample Standard Button Definition select-option is shown on the following screen:



To define custom buttons, use the following commands:


BUTTON 0 DSPL @0P@ DisplaySalesOrder – where 0 is for standard button, DSPL is button FCODE, @0P@ is buttons icon and DisplaySalesOrder is button text0.1.

SEPARATOR – is a separator between buttonThe sample Custom Button Definition select-option is shown on the following screen:

They produce the following toolbar:

You may also include the *FIND *button in Custom Button Definitionand have TOOLBAR EXCLUDE ALL in Standard Button Definition. It will produce the following toolbar with fully functional FIND button without ant additional programming:



Header File Format

The Report Simulator may display header information using SAP Dynamic Document component in a panel above ALV Grid. As default, it will display as a header the path to the data file provided in+ Simulation Data File Path+ parameter. If the Simulation Header File Path is provided, its content will be displayed there. The file should contain $ command script. The following commands are available:</p><ul style=”margin-top: 0in”><li class=”MsoNormal” style=”margin: 6pt 0in 0pt; tab-stops: list .5in left .8in”>$HEADER <HEADER> – to display *$TABLE-ADD <N> – to add table with N columns0.1.

*$COLUMN-ADD <WIDTH> – to declare column *$TEXT-BOLD <TEXT> – to display *$TEXT-NORMAL <TEXT> – to display *$NEWLINE – to change line (to be used with $TEXT command</li></ul><p style=”margin: 6pt 0in 0pt” class=”MsoNormal”>The <TEXT> text may contain formatting characters for {Bold} and  (Italic) font. The PARAGRAPH, TEXT and LINE may be displayed as table column or outside table</p><p style=”margin: 6pt 0in 0pt” class=”MsoNormal”>The sample header file is shown on the following screen:</p><p><textarea cols=”72″ rows=”8″ name=”Sample Code”>$HEADER        Selection Screen Parameters

*$TABLE-ADD     2

*$COLUMN-ADD    70%

*$TEXT-BOLD     Sales Orders:

*$TEXT-NORMAL   1099221000 – 1099224999

*$COLUMN-ADD    30%

*$TEXT-BOLD     Maximum Number of Recotrds:

*$TEXT-NORMAL   1000

Data File Format

The Report Simulator accepts as input a delimited text file. A space character and any delimiter except colon could be used to separate report columns; e.g., TAB, coma, semicolon, space, …

In general, the file contains report column header information in row 1 and sample data in subsequent rows. Optionally, the last line may contain field specification to be used when programming report. The sample data file opened with MS Notebook is shown on the following screen:


If an input file is TAB or comma delimited it might be also opened with MS Excel as shown on the following screen:



As already mentioned, the first row of the file contains the column headers for the report. However, to allow for more flexibility each column header might contain some additional formatting information after a colon ( 🙂 character. Any combination of the following formatting characters is allowed after a colon character:


Lfor left justified column 0.1.

Cfor centered column 0.1.

Rfor right justified column 0.1.

Hfor hotspot column 0.1.

K – +non scrollable key column +0.1.

Xcheckbox column0.1.

I – +for column displaying icons. Icon data must consist of 2 character codes; as specified in ICON Type Group – transaction *SE11; surrounded by @ wrapper characters; e.g., +@1B@*. You could display a list of icons and their corresponding 2 character codes using SHOWICON standard ABAP program

A sample list of icons and their corresponding codes is shown on the following screen generated with SAP Controls Report Simulator:

You could also manipulate row colors by adding a special column with predefined name COLOR – all in capital letters. The row color might be specified in that column as 4 character code starting with letter C followed by 3 digits:


first digitvalue 1 to 7 for different colors 0.1.

second digit0 or 1 for INTENSIFIED OFF or ON 0.1.

third digit0 or for INVERSE OFF or ON

All allowed color combinations shown below were generated using Report Simulator. A text file with color codes shown beside Color Palette report was used as+ Report Simulator +input:


You must be Logged on to comment or reply to a post.
  • Hi Adam,

    Your blog is very interesting.i tried to install the saplink and import the nugg file. I couldnt find the nugg file in the link provided.i found some other file. Can you help me to import the nugget file into my SAP system.

    Vamshi Thoudpunuri

    • Hi Vamshi
      Thank you for your comments. I am working now on making SAP Controls Report Simulator source code available to SAP community worldwide. I have to get permission to do this – hopefully, I will get it in a week or so. It will be probably available on SDN Code Exchange or SDN WiKi site.  As mentioned in blog, the SDN Code Exchange platform is available now only for SAP employees. It will be available to SAP community worldwide probably at the end of Q1 2010. I will let you know once SAP Controls Report Simulator source code is available publicly.
      Best regards,
      Adam Baryla
      • Hi Adam,

            This blog is really intresting and I am eagarly waiting for its public availability. I just wanted to check whether this project is ready by now.

        Thanks & Regards,

  • Hi,

    Has the source code for the report simulator been released yet?  If so, where can I download it form? 

    Mike Germain