Skip to Content
Author's profile photo Former Member

ALV Fast Display Class

Recently I was involved in a project that required writing a lot of custom ALV OO reports in the PP and PS Modules.Most of these reports required a header or a footer section depending on the business functionality of the particular report. I got an idea about how to add header and footer sections in ALV OO reports using the CL_DD_DOCUMENT class from an interesting blog posted by Vijay Babu Dudla.The link to that article is as below : TOP_OF_PAGE in ALV  Using CL_GUI_ALV_GRID

Now my problem was solved but the code kept repeating in each of the 50 odd reports and there was lack of uniformity in the code developement as everyone in the team was coding in their own style.This prompted me to write a class which encapsulates the functionalities of classes CL_GUI_ALV_GRID and CL_DD_DOCUMENT and merges them into a single class which can be used by everybody.This class can now be used to display the header and the footer sections along with the ALV output.The “EVENT_NAME” passed to the constructor decides whether to display the header(TOP_OF_PAGE) or the footer(END_OF_LIST).

Part 1 : Class ZCL_DOCUMENT

Methods image



Note : This class can currently display either the header or the footer .A small modification in the constructor method can be done if both header or footer sections are required together.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo David Halitsky
      David Halitsky
      use text and display-only input fields on your screen, which has to be called anyway?  For uniformity, you can define a template screen that can be cloned and added to any program?

      I'm not saying your way is a "bad" way - I'm just curious what the arguments are against doing it the "old-fashioned" way.

      Author's profile photo Former Member
      Former Member
      The problem with using text and display only fields was the limitatrion in the font size,color and attributes like gaping,underlining etc.Here I have internally used a SAP standard class CL_DD_DOCUMENT which is a very powerful class for handling all kinds of text formatting activities which would not be possible for me in a standard module pool screen.