08-01-2006 4:46 PM
Hi All,
I have a 2 level drill down report in ALV.
The summary report has certain fields and the Detail report has different fields. Now my problem is that when i use a default layout (with all fields of summary report) for the summary report, and drill down to the detail report i'm missing the fields on detail that are not in Summary. And if i save the default layout as default (with all fields of Detail) and go back to sumary, I'm missing the some other fields on summary (which are not on detail report).
Is there a way to make different default layouts for each of those summary and detail reports:
Also as the layouts are choosen by the user, i cannot hardcode any particular layout;
So if the user chooses a layout for detail; it has to stay the same layout for the detail report if he goes to summary and then back to detail; unless the user changes the layout again.
I'm using two different Layout types for each report. but i still cannot get the desired effect.
Data:
gt_layout_s type slis_layout_alv,
gt_layout_d type slis_layout_alv,
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = g_repid
is_layout = <b>gt_layout_s</b>
i_callback_top_of_page = g_top_of_page
i_callback_user_command = g_user_command
i_callback_pf_status_set = g_status
i_save = g_save
is_variant = gs_variant
it_fieldcat = gt_fieldcat[]
it_events = gt_events[]
importing
es_exit_caused_by_user = gs_exit_caused_by_user
tables
t_outtab = it_summary.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = g_repid
is_layout = <b>gt_layout_d</b>
i_callback_top_of_page = g_top_of_page
i_callback_user_command = g_user_command
i_callback_pf_status_set = g_status
i_save = g_save
is_variant = gs_variant
it_fieldcat = gt_fieldcat[]
it_events = gt_events[]
importing
es_exit_caused_by_user = gs_exit_caused_by_user
tables
t_outtab = it_detail_disp.
08-01-2006 5:46 PM
Here is how you differentiate between the layout of two different grids. There is the parameter, IS_VARIANT in the function. You usually leave it empty or pass only the report name and username. <b>What you need to do is to pass unique string for each grids to the HANDLE field of the parameter IS_VARIANT.</b> You can probably hard code it as HEADER and DETAILS in your case. Once that is done, system identified that these two different layout for different grids.
Regards,
Ravi
Note : Please mark all the helpful answers<u></u>
08-01-2006 5:28 PM
08-01-2006 6:04 PM
Hi rich,
I tried to fill something different but it wasn't working.
So right now they are both the same and empty when i pass them.
Thanks,
raj.
08-01-2006 5:46 PM
Here is how you differentiate between the layout of two different grids. There is the parameter, IS_VARIANT in the function. You usually leave it empty or pass only the report name and username. <b>What you need to do is to pass unique string for each grids to the HANDLE field of the parameter IS_VARIANT.</b> You can probably hard code it as HEADER and DETAILS in your case. Once that is done, system identified that these two different layout for different grids.
Regards,
Ravi
Note : Please mark all the helpful answers<u></u>
08-01-2006 6:05 PM
08-01-2006 6:08 PM