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 Header .

Former Member
0 Likes
1,123

Hi;

I have created an ALV using object oriented method (Using custom control).

Now when I view the report in list format (using the list output button in ALV tool bar) I do not get the header.

Please advise me how to add the header in above case.

Thanks

Abhishek

Hi;

I have created an ALV using object oriented method (Using custom control).

Now when I view the report in list format (using the list output button in ALV tool bar) I do not get the header.

Please advise me how to add the header in above case.

Thanks

Abhishek

10 REPLIES 10
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,087

What version of r/3 are you working with?

Regards,

Rich Heilman

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,087

To answer the question, the CL_GUI_ALV_GRID will not handle this. If you have coded a top, the alv_grid does not care and will not print it.

Regards,

Rich Heilman

Read only

0 Likes
1,087

we r using r/3 ver 4.7

And I have coded top of page for the ALV grid and it is working fine.

But I have no idea how to display the header in the ALV list format????

Any Solution?

Read only

0 Likes
1,087

You have to use the event PRINT_TOP_OF_PAGE from the class CL_GUI_ALV_GRID.

Alexandre

Read only

0 Likes
1,087

Sorry not working. Any other solution??

Read only

0 Likes
1,087

I was going to suggest using the new ALV Object Model, but you need to be on a Netweaver release. Using the ALV OM, the top-of-page stuff does get printed in the list display, when using a container.

Regards,

RIch Heilman

Read only

Clemenss
Active Contributor
0 Likes
1,087

Hi,

as the printed output is not screen output but list, it uses internally the function REUSE_ALV_LIST_DISPLAY. You may populate ALV Grid event PRINT_TOP_OF_PAGE. In this event, use WRITE statements to (re-) create the header, This should be passed and handled by ALV_LIST_DISPLAY.

Hope it helps,

Clemens

Read only

Former Member
0 Likes
1,087

Hi Clemens;

Could you please explain me ur suggestion in detail?

What I mean is :

I have already used the event PRINT_TOP_OF_PAGE of class CL_GUI_ALV_GRID but it did not work.

Now as per ur suggestion, I need to pass and populate the event PRINT_TOP_OF_PAGE in the ALV_LIST_DISPLAY, which I believe is actualy the FM Reuse_ALV_LIST_DISPLAY right?

Now could u tell me where should I call this FM?

Read only

Clemenss
Active Contributor
0 Likes
1,087

Hi Abhishek,

I am so sorry. It was a suggestion. I knew that SAP developers are just humans. I hoped they would do something good sometimes.

But not this time!

I tried program BCALV_TEST_GRID_EVENTS just to find out none of the events we could use is even triggered. Not in the grid and not in the list.

And: Internally they use FM K_KKB_LIST_DISPLAY - not passing any events.

Sorry I didn't know they are that bad. But I'm convinced I will stay with the REUSE Function modules. Whatz can I do with the grid I can't with function?

Regards,

Clemens

Read only

Former Member
0 Likes
1,087

Hi,

Go through the sample code,

http://www.sapdevelopment.co.uk/reporting/alv/alvlist.htm

Regards,

Azaz Ali.