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

Selected fields into ALV at runtime !!

srijayant
Explorer
0 Likes
777

hi experts

I hav to display an ALV grid , of the selected fields at run time, i guess i will have to make a new structure dinamically everytime and pass it on to the field catalog, how to do it ???

6 REPLIES 6
Read only

Former Member
0 Likes
728

This message was moderated.

Read only

srijayant
Explorer
0 Likes
728

thx

Read only

rosenberg_eitan
Active Contributor
0 Likes
728

Hi,

If the potential fields list is known have you consider using the field catalog ?

For example if you use CL_GUI_ALV_GRID You can use the "TECH" field in the field catalog .

Regards.

Read only

0 Likes
728

yes Mr. Eitan Rosenberg, all the potential field is known, but the requirment says select random fielfrom those at runtime and when you execute the progrem it sudcreate an ALV of those selected fields.

Read only

0 Likes
728

Hi,

This is good news !

It is very easy then at run time to simply hide from the user the fields he did not select.

How:

Lets assume that you are using CL_GUI_ALV_GRID.

Side note: please download PDF called "An Easy Reference for ALV Grid Control.pdf" goggle for it.

Or see here http://help.sap.com/saphelp_erp2004/helpdata/en/ff/4649a6f17411d2b486006094192fe3/content.htm

At some point you have to generate the field catalog. So either set the field "LVC_S_FCAT-TECH" or simply do not generate a line in the field catalog for the unselected fields. The grid structure stay fixed .

Regards .

Read only

0 Likes
728

Hi,

Eitan is good enough no Mr. here