2010 Jul 06 9:56 AM
Dear forumers,
How can I freeze a row in a basic list ?
This means that the header row (which is "frozen", built by using the WRITE command) will always be displayed as the user scrolls the list vertically.
I tried looking up for resources on this, but I'm unable to find any. Please help.
Thanks for any inputs at all.
2010 Jul 06 11:32 AM
It has been a long time since I worked with basic lists, but I seem to remember if you output the header in a TOP-OF-PAGE block, this stays at the top of the screen whilst the report can be scrolled by the user.
looking at the help it says : The top page header cannot be moved when you scroll vertically in a list displayed on the screen. Which sounds like what you want
2010 Jul 06 11:32 AM
It has been a long time since I worked with basic lists, but I seem to remember if you output the header in a TOP-OF-PAGE block, this stays at the top of the screen whilst the report can be scrolled by the user.
looking at the help it says : The top page header cannot be moved when you scroll vertically in a list displayed on the screen. Which sounds like what you want
2010 Jul 06 11:46 AM
Paul,
Unfortunately I can't use TOP-OF-PAGE because I will need to display multiple list tables in the report output.
Example: I have 3 different internal tables to display in the report output, and so I will need to have a header row (to be "frozen") for each of the internal table display.
I have tried looking into SCROLL LIST and other ways too, but they can't work for such a requirement.
Please please help.
2010 Jul 06 3:53 PM
It's a bit nasty but possible to use a global variable that you set to different values during the output of your internal tables, and write different header lines in TOP-OF-PAGE based on the content of this variable. Also use NEW-PAGE before outputting each internal table.
Thomas
2010 Jul 06 3:57 PM
and make a new-page call after each section when the format changes to invoke the change to the header format.
2010 Jul 06 3:58 PM
I edited my post reg. NEW-PAGE at the same time while you posted yours, to avoid any confusion
Thomas
2010 Jul 06 4:00 PM
2010 Jul 06 4:48 PM
Thanks all, for the inputs here.
But could you please help to explain this further?
Does this mean that I will have 3 different TOP-OF-PAGE events? And how do I set different values to the global variable during the "internal table display"?
Here's what the codes look like, now. Please help.
*&---------------------------------------------------------------------*
*& S T A R T O F S E L E C T I O N
*&---------------------------------------------------------------------*
START-OF-SELECTION.
* Run program (execute processes)
PERFORM run_program.
*&---------------------------------------------------------------------*
*& E N D O F S E L E C T I O N
*&---------------------------------------------------------------------*
END-OF-SELECTION.
* Display basic list output
PERFORM display_report.
*&---------------------------------------------------------------------*
*& Form DISPLAY_REPORT
*&---------------------------------------------------------------------*
* Subroutine to display report output
*----------------------------------------------------------------------*
FORM display_report .
* Display top header information
PERFORM display_top_header.
* Display comparison output results
PERFORM display_output.
ENDFORM. " DISPLAY_REPORTTop header is something like this:
Base Ledger: ......
Comparison Ledger: ......
Date: ......
A sample output has something like this: (this is where the challenge is 😛 )
(for company code A)
Account Trans Curr B Trans Amt B Local Amt C Trans Amt C Local Amt Diff in Trans Diff in Local
.....
.....
.....
.....
.....
.....
(for company code B)
Account Trans Curr B Trans Amt B Local Amt C Trans Amt C Local Amt Diff in Trans Diff in Local
.....
.....
.....
(for company code C)
Account Trans Curr B Trans Amt B Local Amt C Trans Amt C Local Amt Diff in Trans Diff in Local
.....
2010 Jul 06 6:27 PM
Not three separate events..... I declare a global variable like data: gv_section type char1. This is simple, really...consider this...
I update the content of GV_SECTION, based on the table I'm working with now....
at first table:
gv_section =' 1'.
loop at table1. "First line of output triggers top-of-page.
*
so, for example, I'm at the end of the first table....
*
endloop.
next table to be output
gv_section = '2'.
new-page. "triggers top-of-page event.
loop at table2.......
and so on...
endloop.
. . .
top-of-page.
data: lv_head(132).
case gv_section.
when 1.
lv_head = 'What I want to display for table1.
when 2.
lv_head = 'What I want to display for this table'.
when 3.
lv_head = 'Something else I want to display'.
endcase.
...
output standard heading
....
write:/ lv_head centered.
. . .
Edited by: BreakPoint on Jul 6, 2010 7:31 PM
2010 Jul 07 9:49 AM
Thanks for all the help and explanations here. Appreciate it.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |