Link Search Menu Expand Document

No template. Grid-based

Classes for storing templates

Previously, to create a report, you had to select one of the available classes for template storing

image

Namely:

  • ZCL_XTT_FILE_SMW0 For templates tr. SMW0 (most common)
  • ZCL_XTT_FILE_OAOR tr. OAOR is convenient because there is a built-in BDS versioning for templates
  • ZCL_XTT_FILE_RAW Mainly used for templates based on String (less commonly xString) and ZCL_XTT_HTML class. Which in turn is used most often for sending letters

Tabular reports

If you often create reports based on CL_SALV_TABLE or CL_GUI_ALV_GRID using subtotals and data grouping, and at the same time you do not want to create an Excel template that just repeats ALV output, this class will help you with this.

This class ZCL_XTT_FILE_GRID creates an empty template for ZCL_XTT_EXCEL_XLSX and has a number of advantages over standard export to Excel

image

Different colors for subtotals (line 20) and modern Calibri font

image


If subtotals are grouped

image

In the final report, the data will also be grouped

image


PS:
If your report is based on the CL_SALV_TABLE class and you need the CL_GUI_ALV_GRID class to pass to the ZCL_XTT_FILE_GRID constructor.

You can use ZCL_EUI_CONV=>GET_GRID_FROM_SALV() method to convert object references