Application Development 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: 

How can i convert alv grid into alv list?

rmdp
Discoverer
0 Kudos
379

How can I convert an alv grid into an alv list to be able to place several headers.

make it like the example I put above.

2 REPLIES 2

natarajg
Discoverer
0 Kudos
291

DATA: lt_fieldcat TYPE lvc_t_fcat.

ls_fieldcat-fieldname = 'FIELD1'.

ls_fieldcat-top_of_page = 'X'.

ls_fieldcat-page = 'X'.

APPEND ls_fieldcat TO lt_fieldcat.

ls_fieldcat-fieldname = 'FIELD2'.

ls_fieldcat-top_of_page = 'X'.

ls_fieldcat-page = 'X'.

APPEND ls_fieldcat TO lt_fieldcat.

ls_fieldcat-fieldname = 'FIELD3'.

ls_fieldcat-top_of_page = 'X'.

APPEND ls_fieldcat TO lt_fieldcat.

ls_fieldcat-fieldname = 'FIELD4'.

ls_fieldcat-page = 'X'.

APPEND ls_fieldcat TO lt_fieldcat.

DATA: lt_output TYPE TABLE OF som_fieldcat_alv,

ls_output TYPE som_fieldcat_alv.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

it_fieldcatalogue = lt_fieldcat

it_sort = lt_sort

it_filter = lt_filter

TABLES t_outtab = lt_output.

fathimawajiha
Explorer
0 Kudos
291

Hi rmdp,

You can simply use FM 'REUSE_ALV_LIST_DISPLAY'.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
 EXPORTING
    IT_FIELDCAT            =   it_fcat
 TABLES
    t_outtab               =   itab.

Regards,

Wajiha Fathima.