Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV grid using Classes

Former Member
0 Likes
351

I am having a problem while displaying data using ALV grid by the method of classes.I am not able display data for the top-of-page event (which is a protected method in the ALV class - Z class).How do I access this method for display of information in Top of Page and feed the data there? The Display ALV grid( all data from an internal table ) meanwhile is a Public method in the same class.

Moreover I am also not able to provide any description for field headings(columns) just as we do while filling field catalog in the normal AL grid display.They appear only if they are dictionary fields.How do I provide my own descriptions?

2 REPLIES 2
Read only

uwe_schieferstein
Active Contributor
0 Likes
316

Hello Savitha

For the print events have a look at the posting of Judith in thread

The following fields of the fieldcatalog (LVC_S_FCAT) are used for column texts:

<b>COLTEXT</b> ALV control: Column heading

SCRTEXT_L Long Field Label

SCRTEXT_M Medium Field Label

SCRTEXT_S Short Field Label

Regards

Uwe

Read only

uwe_schieferstein
Active Contributor
0 Likes
316

Hello Savitha

Please refer also to sample report

BCALV_GRID_01

. Below is shown part of the documentation in the program header.

program bcalvc_print.
*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
* Purpose:
* ~~~~~~~~
* This program illustrates how the events for print processing
*   - PRINT_TOP_OF_PAGE
*   - PRINT_END_OF_PAGE
*   - PRINT_TOP_OF_LIST
*   - PRINT_END_OF_LIST
*
* are handled. The corresponding handler methods control the
* appearance of the list printed.
*-----------------------------------------------------------------
* To check program behavior
* ~~~~~~~~~~~~~~~~~~~~~~~~~
* Print the list shown (It has got only three pages).
* Remark: If you choose "Druckansicht" (preview?!) before printing,
*         the output for event PRINT_END_OF_PAGE is left out due
*         to scrolling.
*         Create a spool entry and preview your printout by calling
*         TA sp01 to reduce paper output please.
*-----------------------------------------------------------------
* Essential steps (Search for '§')
* ~~~~~~~~~~~~~~~
* 1. Define a (local) class for event handling
* 2. Define a method for each print event you need.
* 3. Implement your event handler methods. Use WRITE to provide output.
* 4. Link used print events and event handler methods.
* 5. In case of PRINT_END_OF_PAGE, you must set 'reservelns' to
*    the number of reserved lines at the end of a page.
*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

Regards

Uwe