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

How to freeze row in basic list

former_member367551
Participant
0 Likes
1,276

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,222

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

9 REPLIES 9
Read only

Former Member
0 Likes
1,223

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

Read only

0 Likes
1,222

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.

Read only

0 Likes
1,222

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

Read only

0 Likes
1,222

and make a new-page call after each section when the format changes to invoke the change to the header format.

Read only

0 Likes
1,222

I edited my post reg. NEW-PAGE at the same time while you posted yours, to avoid any confusion

Thomas

Read only

0 Likes
1,222

great minds think alike

Read only

0 Likes
1,222

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_REPORT

Top 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

.....

Read only

0 Likes
1,222

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

Read only

0 Likes
1,222

Thanks for all the help and explanations here. Appreciate it.