Skip to Content
0
Former Member
Aug 01, 2006 at 03:46 PM

Use different Layouts for Summary and Details in Drill down report

222 Views

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.