2006 Jul 02 9:51 PM
Hi,
I have created on one Dynpro 3 Custom Controls, which are
responsible for Three ALV Grid Reports.
I have named CC1 for ALV1 CC2 for ALV2 and CC3 for ALV3.
I can put the Data for each ALVs.
So far so good, but if I save the Layout global for one ALV and start the Program again, disappears me some Elements on other ALVs like Columns , Buttons etc...
I have used Method set_for_first_display.
Thanks for your Replies.
Best Regards
Beserithan Malabakan
2006 Jul 03 7:15 AM
Wha tis happening is the VARIANT parameter values that you are passing are the same for all the three grids. So, once you alter the layout of one its changing all the grids. What you need to do is to specify a unique name in the field HANDLE of the parameter VARIANT for each grid, say the grid name.
Then this problem will not occur and you will have variants specific to the grid.
It has nothing to do with the global / user defined layouts.
Regards,
Ravi
Note: Please mark the helpful answers
2006 Jul 02 10:06 PM
Hi,
Global layout settings will be applicable for all the ALV's on the screen, try to create user defind layout settings for each ALV.
Laxman
2006 Jul 02 10:09 PM
You should use control specific methods to assign layouts to your 3 controls.
refer to this link
http://help.sap.com/saphelp_erp2004/helpdata/en/22/a3f5ecd2fe11d2b467006094192fe3/content.htm
You should use <b>get_variant</b> I guess.
Regds
Manohar
2006 Jul 03 7:05 AM
Hi,
Try this method after u had called set_for_first_display
REFRESH_TABLE_DISPLAY...
Hope this helps!!!
Seema.
2006 Jul 03 7:15 AM
Wha tis happening is the VARIANT parameter values that you are passing are the same for all the three grids. So, once you alter the layout of one its changing all the grids. What you need to do is to specify a unique name in the field HANDLE of the parameter VARIANT for each grid, say the grid name.
Then this problem will not occur and you will have variants specific to the grid.
It has nothing to do with the global / user defined layouts.
Regards,
Ravi
Note: Please mark the helpful answers
2006 Jul 03 3:27 PM
2006 Jul 03 3:32 PM
In your SET_TABLE_FOR_FIRST_DISPLAY method , there is a parameter I_VARIANT. To that pass values like for each of the grid.
WA_VARIANT-REPORT = SY-REPID.
WA_VARIANT-USERNAME = SY-UNAME.
WA_VARIANT-HANDLE = Grid Name.
So, have three different WA_VARIANT (TYPE DISVARIANT) and pass them seprately to each of the calls of set table method of each grid. That should fix the issue.
Regards,
Ravi
Note : Please close the thread if the issue is resolved
2006 Jul 03 3:34 PM
Data: variant1 type disvariant.
Data: variant2 type disvariant.
Data: variant3 type disvariant.
variant1-REPORT = sy-repid.
variant1-HANDLE = 'ALV1'.
variant1-USERNAME = sy-uname.
variant2-REPORT = sy-repid.
variant2-HANDLE = 'ALV2'.
variant2-USERNAME = sy-uname.
variant3-REPORT = sy-repid.
variant3-HANDLE = 'ALV3'.
variant3-USERNAME = sy-uname.
Regards,
Rich Heilman