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 to set more than one default lay out in ALV grid

Former Member
0 Kudos
765

Hello All,

I have called ALV grid on two different radio buttons and both are fetching different fields.

My I want set default layout for each ration button.

Please help me.

3 REPLIES 3

raymond_giuseppi
Active Contributor
282

Look better at the DISVARIANT structure (used by the IS_VARIANT parameters in class and FM) you will notice HANDLE and LOG_GROUP which can be used to distinguish between several ALV in a single program. Just fill the HANDLE field with a value depending on the radio-button checked, you will get a set of different variant for each value and a default value is available for each value of handle.

Regards,

Raymond

Former Member
282

Hi,

Look at the example of use  LOG_GROUP

Default layout can be defined for each LOG_GROUP

Regards,

Boris

marcosmata
Participant
282

You could set 1 dynpro (100 for example)  for the ALV Grid. This dynpro must have a SUB Screen Container so you can load a sub screen on this dynpro.

Now you must have 2 differents dynpros (101 and 102 for example).

In the pbo of the main dynpro (100) you must ask for what radio button is marked so you can decid which subscreen will load on dynpro 100.

Its quite easy.

Try it!