Skip to Content
Technical Articles
Author's profile photo Birzhan Moldabayev

XTT – Table part of report

Hi everyone,

Previously for making simple reports we used a R TYPE ts_root structure & special anchors like ‘{R-TITLE}’ … ‘{R-BOTTOM}’ which represent fields of the ROOT structure in the in Excel | Word | Pdf templates.

In this post we go further & try to display most powerful data type in ABAP. As you already guessed I’m writing about internal tables.

Let’s add a random table description

      " Random table data
      BEGIN OF ts_rand_data,
        group   TYPE string,
        caption TYPE string,
        date    TYPE d,
        sum1    TYPE p LENGTH 13 DECIMALS 2,
        sum2    TYPE p LENGTH 13 DECIMALS 2,
      END OF ts_rand_data,
      tt_rand_data TYPE STANDARD TABLE OF ts_rand_data WITH DEFAULT KEY.

 

and add it to a root structure

    " Document structure
    BEGIN OF ts_root,
      footer   TYPE string,
      t        TYPE tt_rand_data, " internal flat table ( In template {R-T} )
...
    END OF ts_root.

 

After filling R-T table with data we could use it in word template

table%20in%20word

table in word

or in excel template

 

table%20in%20excel

table in excel

 


 

There are several things worth to mention:

 

  • 1 internal table row can correspond several rows in template

 

 

  • All list objects (and Pivot Tables based on them) in Excel with corresponding formulas would be properly stretched.

 

  • Named ranges (Ctrl + F3 in excel) will be extended automatically

 

  • Formulas with scope are supported (Worksheet or Workbook)
    Including “Print titles”

 


 

  • Pdf

Report

Template (xdp)

xdp%20file%20format%20%28Livecycle%20Designer%29

xdp file format (Livecycle Designer)

 

  • Word

Template

Report

  • Excel

Template

Report


 

Tables are very wide topic and reading all capabilities would be very tedious.

That’s why related articles are listed below:

 

 

 

Assigned Tags

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