This website is not affiliated with, sponsored by, or approved by SAP AG.

PRINT_TOP_OF_PAGE event

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

PRINT_TOP_OF_PAGE event

Postby RC » Wed Aug 27, 2003 5:17 pm

Hello

Is it possible to find the output table line that is being processed during TOP_OF_PAGE event in ALV .

In BCALV_GRID_01 example SAP is reading the field catlg with index 1 .

I need to print some additional data on top of page based on the line being processed. Any clue gurus ?

cheers
RC
 

Postby Guest » Wed Aug 27, 2003 5:27 pm

CALL FUNCTION 'REUSE_ALV_LIST_LAYOUT_INFO_SET'
EXPORTING
IS_LAYOUT = S_LAYOUT
IT_FIELDCAT = S_FIELDCAT
IT_SORT =
IT_FILTER =
IS_LIST_SCROLL =
EXCEPTIONS
OTHERS = 1.

SridharS
Guest
 

Postby RC » Wed Aug 27, 2003 8:40 pm

I'm using objects as specified in the BCALV_GRID_01 program not fun.module.

Sridhar - Just curious . Does this func. module give the desired result ?

Thanks for your posting
RC
 

Postby RC » Thu Aug 28, 2003 7:40 am

Please , can some one help me on this issue. I need to resolve this somehow by today.
RC
 

Postby RC » Thu Aug 28, 2003 9:02 am

Hello

Is there anyone out there who has faced this issue ...

cheers

Robert.
RC
 

PRINT_TOP_OF_PAGE event in ALV

Postby Manoj Pingali » Thu Aug 28, 2003 11:16 am

Hi Robert,

Use the sample code specified below as the guideline. For more info. refer to the documentation of the FM 'REUSE_ALV_COMMENTARY_WRITE'.

Have fun,

Manoj Pingali

DATA: first(01) type c,
events type slis_t_event,
gt_list_top_of_page type slis_t_listheader,
ls_event type slis_alv_event.

initialization.
call function 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = events
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2.

read table events with key name = 'TOP_OF_PAGE'
into ls_event.
if sy-subrc = 0.
move: 'TOP_OF_PAGE' to ls_event-form.
append ls_event to events.
clear ls_event.
endif.
** End of additions
* Start-of-selection
START-OF-SELECTION.
-----

* Top-of-page
TOP-OF-PAGE.

PERFORM TOP_OF_PAGE.

FORM TOP_OF_PAGE .
data: ls_line type slis_listheader.
if first is initial.
ls_line-typ = 'S'.
ls_line-key = 'Run Date :'.
write: sy-datum to ls_line-key+10 mm/dd/yyyy.
ls_line-info = 'Billing Date:'.
write: s_fkdat-low to ls_line-info+15 mm/dd/yyyy.
ls_line-info+28 = 'To'.
write s_fkdat-high to ls_line-info+32 mm/dd/yyyy.
append ls_line to gt_list_top_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = gt_list_top_of_page.
first = 'N'.
else.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = gt_list_top_of_page.
endif.
ENDFORM. " top_of_page
Have fun,

Manoj Pingali
Manoj Pingali
 
Posts: 78
Joined: Wed Oct 23, 2002 5:08 pm
Location: St.Louis, USA

Postby RC » Thu Aug 28, 2003 12:46 pm

Manoj

I really appreciate for your code. But, please refer my question
In your code you are printing the select option value. That will work like a charm . No doubt .

What i asked for is
During TOP_OF_PAGE event , i need the value of the line from the internal table (which is my output table) .

Is this possible ?

Thanks

Rob.
RC
 

Which line

Postby jonvaughan » Fri Aug 29, 2003 1:58 am

Which line are you after ?
At top-of-page there will be no line selected in the internal table.

If there is a key it will be in SY-TABIX use that to read your table perhaps

Jon
jonvaughan
 
Posts: 308
Joined: Sun Nov 24, 2002 8:35 pm

Postby RC » Fri Aug 29, 2003 6:55 am

Jon

SY-TABIX doesn't show the right value. In other words when the table has just 2 lines , the SY-TABIX shows a value of 28.
RC
 

SY-LINNO

Postby jonvaughan » Mon Sep 01, 2003 12:28 am

SY-LINNO ?
jonvaughan
 
Posts: 308
Joined: Sun Nov 24, 2002 8:35 pm


Return to ABAP

Who is online

Users browsing this forum: No registered users and 9 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.