2011 Jun 30 3:13 PM
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
2011 Jun 30 7:15 PM
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
2011 Jun 30 5:43 PM
You can display the internal table with header in part of the screen using OO ALV.
2011 Jun 30 7:15 PM
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
2011 Jul 01 9:35 AM
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
2011 Jul 01 9:43 AM
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
2011 Jul 01 11:20 AM
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
2011 Jul 01 11:25 AM
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
2011 Jul 01 11:28 AM
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.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |