Technical Articles
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 in word
or in excel template
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
- Also data validation are also expanding automatically
- Formulas with scope are supported (Worksheet or Workbook)
Including “Print titles”
xdp file format (Livecycle Designer)
- Word
- Excel
Tables are very wide topic and reading all capabilities would be very tedious.
That’s why related articles are listed below: