Skip to main content

Posts

Showing posts with the label Formatting

Develop Abap reports quickly and easily

Here is a piece of code to write ABAP reports and format them easily and quickly. The following code can be created as an include and used whenever required. This code uses the ABAP objects and created as local class. This include can be used for printing Internal tables, either by passing the whole table or by passing individual lines. Using the following steps the report output can be easily formatted. Create object with referance to lcl_report. Create column formats for individual columns by building the t_format structure and calling the method add_column as follows call method x->add_column exporting l_format = comp_print = 'K' (to print the column with key color) comp_print = 'H' (to print the column as hotspot) Call method write_table for listing the whole internal table. call method x->write_table exporting p_table = Call method write_line for listing one line at a time. May be used in cases where loop control is with the main program. call method x...