fidley / falv

FALV - Fast ALV Grid
https://abapblog.com
GNU General Public License v3.0
141 stars 52 forks source link

Multiple ALVs Default Layout hiding all columns #68

Closed mamuduruvenkatesh closed 2 years ago

mamuduruvenkatesh commented 2 years ago

Hello Team,

Greetings for the day..!

I am started using FLAV classes and it's amazing. Congratulation.

While using falv we come across below case, could you kindly check and let me know if we have already solution for this..!

Problem description: There is an issue with ALVs default layout:

In case the screen is divided into more than one container, and each container hold separate ALV Grid. Both grids with separate set of columns If the user will define a default layout in one of them, then upon entering the screen the second one will disappear.

The cause of the problem is that there is a flaw in default layout functionality - it basically checks the report name and the screen number where it kicks in.

In mentioned case - we have 2 different ALVs with the same report name and screen number.

My guess is problem is while setting "VARIANT" parameters. Here we would need a differentiator to identify each ALV in same screen. image

fidley commented 2 years ago

Hello, this is standard ALV. Use variant-handle to setup two different IDs of layouts image

mamuduruvenkatesh commented 2 years ago

Hello Fidley,

Thank you so much for super quick response.

I though of this, we would like to have this correction in FLAV class. While doing same in the method "CREATE" we don't have any identification of each layout(when control goes from 1st layout to 2nd layout) to assign different ID's of layouts.

Could you guide me with this please.

Kind regards, Venkatesh

fidley commented 2 years ago

@mamuduruvenkatesh, the problem with the HANDLE field is that the value of this field is stored in the DB. So any dynamic assignment of this field would make only troubles. So just after calling the CREATE method, add this 1 line of code: falv->variant-handle = 'xxxx' It will be then used in display method.