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: 

FUNCTION 'REUSE_ALV_GRID_DISPLAY' - Fieldcat modify in user_command?

Clemenss
Active Contributor
0 Kudos

Hi,

with ALV function call, is it possible to modify the field catalog when processing the event form 'USER_COMMAND'?

The reason:

Before calling the display, I generate the field catalog. Then I set all unpopulated columns (field is initial in all lines) to 'TECH'. So I see only 'active' columns.

Now, the user can do some interaction which will change the lines values. In event routine for 'USER_COMMAND, I set the selfield-refresh = 'X'.

But now, for some fields, I want to remove the 'TECH' attribute of the field catalog because they get populated.

How to achieve this?

Regards,

Clemens

3 REPLIES 3

Former Member
0 Kudos

Hello ,

Under the the event USERCOMMAND you can modify the fieldcatalog but to see the result you will have the REUSE_ALV_GRID_DISPLAY again.

0 Kudos

> Under the the event USERCOMMAND you can

> you can modify the fieldcatalog but to see the result

> you will have the REUSE_ALV_GRID_DISPLAY again.

You don't need to call REUSE_ALV_GRID_DISPLAY again. Try REUSE_ALV_GRID_LAYOUT_INFO_GET/REUSE_ALV_GRID_LAYOUT_INFO_SET.

Regards Hendrik

Clemenss
Active Contributor
0 Kudos

Ha!

Don't remember who gave me this hint - thank you so uch!

Function group SLVC_FULLSCREEN

hast the FMs

REUSE_ALV_GRID_DISPLAY,

REUSE_ALV_GRID_DISPLAY_LVC

and also

GET_GLOBALS_FROM_SLVC_FULLSCR

Here you have the exporting parameter E_GRID as a reference of current instance of CL_GUI_ALV_GRID.

You may use this to access all the methods as i.e. GET_FRONTEND_FIELDCATALOG and SET_FRONTEND_FIELDCATALOG

and whatever more you want.

Makes use of OO technology almost obsolete

Regards,

Clemens