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: 

Drill down ALV report: Diffrent default layout for primary and secondry ALV

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

jarryq
Explorer
0 Kudos

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.

5 REPLIES 5

christian_wohlfahrt
Active Contributor
0 Kudos

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

jarryq
Explorer
0 Kudos

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.

Former Member
0 Kudos

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.

0 Kudos

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.

0 Kudos

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.