Skip to Content
author's profile photo Former Member
Former Member

Use different Layouts for Summary and Details in Drill down report

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 01, 2006 at 04: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>

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 01, 2006 at 04:28 PM

    How is the gt_layout_s layout differ from the gt_layout_d layout? Can I see the code that is filling these structures?

    Regards.

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.