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

Output internal table to screen

MichiFr
Participant
0 Likes
1,476

Hi,

is there any FM to output an internal table's content to screen, similar to Abap demo DEMO_LIST_GRID?

I don't want to use any ALV grids or popup FM's since the content should be placed between some text on the screen, basically following this layout:

Line 1

Line 2

[grid 1]

[grid 2]

Line 3

Line 4

...

The mentioned demo application works almost correct, however, it misses the header of the internal table's fields. Before reinventing the wheel I would like to know if sbdy knows about any FM which does the job - write out an internal table with header and rows?

cu,

Michael

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,328

Hi Michael,

This is called "block lists", see demo program BALVBT01 for instance. You may also use REUSE_ALV_LIST_DISPLAY with the parameter IS_LAYOUT-LIST_APPEND = 'X' starting from the second table (see FM documentation).

You use WRITE statement as usually between each table.

Sandra

Hi,

is there any FM to output an internal table's content to screen, similar to Abap demo DEMO_LIST_GRID?

I don't want to use any ALV grids or popup FM's since the content should be placed between some text on the screen, basically following this layout:

Line 1

Line 2

[grid 1]

[grid 2]

Line 3

Line 4

...

The mentioned demo application works almost correct, however, it misses the header of the internal table's fields. Before reinventing the wheel I would like to know if sbdy knows about any FM which does the job - write out an internal table with header and rows?

cu,

Michael

7 REPLIES 7
Read only

Former Member
0 Likes
1,328

You can display the internal table with header in part of the screen using OO ALV.

Read only

Sandra_Rossi
Active Contributor
0 Likes
1,329

Hi Michael,

This is called "block lists", see demo program BALVBT01 for instance. You may also use REUSE_ALV_LIST_DISPLAY with the parameter IS_LAYOUT-LIST_APPEND = 'X' starting from the second table (see FM documentation).

You use WRITE statement as usually between each table.

Sandra

Read only

0 Likes
1,328

Sandra thanks for your reply.

I've not tried your hints to get my internal table to screen, which works of course, however, this happens on a single, stand-alone screen. At least in my case.

I'm using some write statements to put out some lines to screen first. After those lines I would like to print out my internal table, now using a sequence of FMs REUSE_ALV_BLOCK_LIST_INIT, REUSE_ALV_BLOCK_LIST_APPEND and REUSE_ALV_BLOCK_LIST_DISPLAY, followed by some more lines, using write stmts again.

Those FMs immediately display the internal table on screen ignoring my initial write statements, however.

Did I made sthg wrong or is it not possible to do such kind of screen layouts?

cu,

Michael

Read only

0 Likes
1,328

Hi,

yes FMs immediately display the internal table on screen. Did u try to press back button after the alv display, i guess now you r write statements will be seen on the screen. Instead of using write statements , use one more layout for header and use the fm REUSE_ALV_BLOCK_LIST_APPEND.

Regards,

Nagaraj

Read only

0 Likes
1,328

Correct! After going back, my output, done by the write statements, are visible.

My intention, however, is to get a mixed layout as mentioned in my first posting: some lines of texts, one or two more grids and finally some lines again.

Michael

Read only

0 Likes
1,328

Hi Michael,

You must send the WRITE inside a callback routine of the ALV so that the same list level is used. You pass the name of your own subroutine where you do the WRITE in the IT_EVENTS parameter, for event code 'TOP_OF_LIST' or 'END_OF_LIST' for example (see example in program BALVBT01).

BR

Sandra

Read only

0 Likes
1,328

Hi,

You just need to use a normal ALV with top of page and end of page.

[http://wiki.sdn.sap.com/wiki/display/ABAP/AddHeadertoALVreport]

IF this doesnt suffice, then define an OOPS ALV with containers on your screen.