Making Settings for Printing
Users can print the ALV output on a printer or they can view the printout on the screen. You are able to change the look of these printouts by making various settings in the list-type ALV outputs using the ALV object model.
For all of the following functions, this is valid:
Display type ALV Tool |
Classic ABAP list |
Full screen |
In the Container |
Simple, two-dimensional table |
Yes |
Yes |
Yes |
Hierarchical-sequential list |
Yes |
|
|
Tree structure |
|
No |
No |

Of course the user is also able to print a tree structure. However, you cannot make settings for the printout here with the ALV object model.
No matter which display type you use to display the ALV output on the screen: in the printout, the ALV output is converted to the classic ABAP list (or to a list in the style of the ABAP list) and is printed in this form.
You can make the following settings for the printout of the ALV output:
· Output additional information
· Output standard title of the program
· Determine that the ALV be called in print mode
· Take actual list size into consideration during printing
· Optimize Column Width in the Printout
· Reserve Rows for Event END_OF_PAGE
In addition to the actual ALV output you are able to output two areas in the printout:
·
List
information
Information as to which filter and which sort are being applied to the ALV
output and as to how many data records the ALV output is
restricted.
·
Selection
information
Information as to which application-specific selection criteria the user used
to call the ALV output (for example company code or material
number)
If you activate one or both pieces of additional information, the corresponding information blocks are printed before the ALV output.
You are able to determine whether a page break should be inserted after these information blocks, thus causing the additional information to appear on a separate page as a cover sheet, or whether the ALV output should be added directly after the additional information.
Methods
Function |
Class |
Method |
Output of list information |
CL_SALV_PRINT |
SET_LISTINFO_ON |
Check whether list information are being output |
IS_LISTINFO_ON |
|
Output selection information |
SET_SELECTIONINFO_ON |
|
Check whether selection information is being output |
IS_SELECTIONINFO_ON |
|
Output additional information on a separate page |
SET_COVERPAGE_ON |
|
Check whether additional information is being printed on a separate page |
IS_COVERPAGE_ON |
The standard title of the program comprises the current date, the title of the ALV output and the page number. You are able to show the standard title.
Methods
Function |
Class |
Method |
Output standard title of the program |
CL_SALV_PRINT |
SET_REPORT_ |
You are able to print the ALV output directly without having to first display it on the screen.
Methods
Function |
Class |
Method |
Print ALV output directly |
CL_SALV_PRINT |
SET_PRINT_ONLY |
Check whether ALV output is being printed directly |
IS_PRINT_ONLY |
You can use the application to determine how wide the list should be in the printout. If the width of the ALV output has changed (for example because the user is showing columns), it can be that the page is not big enough to show all the information. You are able to set that ALV determine the current size before printing and then changes the print parameters accordingly.
Methods
Function |
Class |
Method |
Take actual list size into consideration during printing |
CL_SALV_PRINT |
SET_PRINT_PARAMETERS_ |
Check whether the list size can be adapted |
IS_PRINT_PARAMETERS_ |
