03-30-2011 1:37 PM
Hello,
I have one requirnment related to Drill down alv report.
My primary ALV has one default layout. But when user check secodry ALV same default layout is getting populated there also.
User wants to use diffrent default layout for secondry ALV. I am using funtion module REUSE_ALV_GRID_DISPLAY.
Thanks in advance for your valuable inputs.
03-30-2011 4:14 PM
Hi,
You may just create a different field catalog for that secondary layout or you may save a different ALV Layout and pass the layout name in the is_variant parameter of REUSE_ALV_GRID_DISPLAY when user check secondary layout.
Hope it helps.
03-30-2011 4:06 PM
Hi Nikhil,
I had the same problem: defaults are just defined per program. My solution was to give to selection-parameters, were Layouts could be entered at report-start. Then inside I could call ALVs with the two different layouts.
But I don't see standard defaults working in case of secondary ALV.
BR, Christian
03-30-2011 4:14 PM
Hi,
You may just create a different field catalog for that secondary layout or you may save a different ALV Layout and pass the layout name in the is_variant parameter of REUSE_ALV_GRID_DISPLAY when user check secondary layout.
Hope it helps.
03-31-2011 5:51 AM
Hi
you mean i have to hard code any of layot user wants for secondry layout and than use is_variant to diplay it as default layout.
03-31-2011 4:37 PM
Hi,
not so much hard coding, just the usual layout-selection like in BCALV_GRID_10:
PARAMETERS: p_lay_k TYPE disvariant-variant,
p_lay_p TYPE disvariant-variant.
*----------------------------------------------------------------------*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_lay_k.
PERFORM f01_f4_variant CHANGING p_lay_k.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_lay_p.
PERFORM f01_f4_variant CHANGING p_lay_p.
and later - as you said - calling the ALV with the pre-defined layout. It's still possible to change and save the layouts as a user without coding, only default selection isn't working, just explicit selection via report-select-options has to be done.
04-01-2011 3:44 PM
Hi,
these are, i think the options to do this;
1. if the layouts for the ALVs are fixed, you may hardcode two different field catalogs.
2. is_variant parameter is used to choose a saved layout of your ALV, so you have to first save an ALV layout.
3. you may want to check this program RPLICO10, where you can choose the fields you want for your ALV.
Good day.