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: 

dynamic columns in ALV

former_member650792
Participant
0 Kudos

Dear Experts,

I want to display dynamc columns in ALV, how it possible.

venkey

3 REPLIES 3

Former Member
0 Kudos

Hi,

we need to create the internal table dynamically.

pls search with SAP RTTS (RunTime Type Services) for the same.

thanks,

teja.

Former Member
0 Kudos

HI Venkey,

Many threads are already there in SCN .

http://www.sdn.sap.com/irj/scn/advancedsearch?query=+dynamiccolumnsinALV+++

Regards,

Pravin

0 Kudos

create dynamic internal table from field catalog i m sending u some sample code hope it will help u.

FORM create_dynamic_itab.

  • Create dynamic internal table and assign to FS

CALL METHOD cl_alv_table_create=>create_dynamic_table

EXPORTING

it_fieldcatalog = it_fieldcat[]

IMPORTING

ep_table = dy_table.

ASSIGN dy_table->* TO <dyn_table>.

  • Create dynamic work area and assign to FS

CREATE DATA dy_line LIKE LINE OF <dyn_table>.

ASSIGN dy_line->* TO <dyn_wa>.

ENDFORM.