Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
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



 




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



 




 

  • Pdf


Report

Template (xdp)


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: