<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ALV Layout problem needs your help. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-layout-problem-needs-your-help/m-p/1445840#M211690</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is simple sample prg...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report alv_gridcontrol message-id zmsg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: ok_code like sy-ucomm,&lt;/P&gt;&lt;P&gt;      gt_sflight type table of sflight,&lt;/P&gt;&lt;P&gt;      g_container type scrfname value 'BCALV_GRID_DEMO_0100_CONT1',&lt;/P&gt;&lt;P&gt;      grid1  type ref to cl_gui_alv_grid,&lt;/P&gt;&lt;P&gt;      g_custom_container type ref to cl_gui_custom_container.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      MAIN                                                          *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from sflight into table gt_sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call screen 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      MODULE PBO OUTPUT                                             *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module pbo output.&lt;/P&gt;&lt;P&gt;  set pf-status space.&lt;/P&gt;&lt;P&gt;  if g_custom_container is initial.&lt;/P&gt;&lt;P&gt;    create object g_custom_container&lt;/P&gt;&lt;P&gt;           exporting container_name = g_container.&lt;/P&gt;&lt;P&gt;    create object grid1&lt;/P&gt;&lt;P&gt;           exporting i_parent = g_custom_container.&lt;/P&gt;&lt;P&gt;    call method grid1-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;      exporting&lt;/P&gt;&lt;P&gt;        i_structure_name = 'SFLIGHT'&lt;/P&gt;&lt;P&gt;      changing&lt;/P&gt;&lt;P&gt;        it_outtab        = gt_sflight.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endmodule.                    "PBO OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      MODULE PAI INPUT                                              *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module pai input.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  to react on oi_custom_events:&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CALL METHOD CL_GUI_CFW=&amp;gt;DISPATCH.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CASE OK_CODE.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WHEN 'EXIT'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     PERFORM EXIT_PROGRAM.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WHEN OTHERS.&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;    do nothing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; ENDCASE.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CLEAR OK_CODE.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call method grid1-&amp;gt;select_text_in_curr_cell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;message i000 with 'HELLO WORLD'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmodule.                    "PAI INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      FORM EXIT_PROGRAM                                             *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form exit_program.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CALL METHOD G_CUSTOM_CONTAINER-&amp;gt;FREE.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CALL METHOD CL_GUI_CFW=&amp;gt;FLUSH.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  leave program.&lt;/P&gt;&lt;P&gt;endform.                    "EXIT_PROGRAM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Jul 2006 12:04:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-03T12:04:02Z</dc:date>
    <item>
      <title>ALV Layout problem needs your help.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-layout-problem-needs-your-help/m-p/1445834#M211684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear SAP Fun&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have met following problem with ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The customer said &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In condition A.&lt;/P&gt;&lt;P&gt;The screen should display one ALV control with size of &lt;/P&gt;&lt;P&gt;50 * 100(The total size of this control). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In condition B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The screen should display two same ALV controls with size of 25&lt;STRONG&gt;100. That means the total size of the two ALVs is the same as the previous one. So, 50&lt;/STRONG&gt;100 is just&lt;/P&gt;&lt;P&gt;for the two ALVs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want confirm it is possible to realize it by using ALV?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2006 11:25:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-layout-problem-needs-your-help/m-p/1445834#M211684</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-03T11:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Layout problem needs your help.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-layout-problem-needs-your-help/m-p/1445835#M211685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Following requirement can be easily full-filled by using custom containers on screen.This requires using of OOABAP for which you can refer to standard reports using BCALV_* in SE38 Tcode.&lt;/P&gt;&lt;P&gt;You can call more than one container on the screen and use it like a frame.&lt;/P&gt;&lt;P&gt;So for diaplaying your requirement best option is to design two screen one with one container and another with two container and accordingly call the screen on the request basis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2006 11:47:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-layout-problem-needs-your-help/m-p/1445835#M211685</guid>
      <dc:creator>amit_khare</dc:creator>
      <dc:date>2006-07-03T11:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Layout problem needs your help.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-layout-problem-needs-your-help/m-p/1445836#M211686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes you can but use the OO GRID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2006 11:48:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-layout-problem-needs-your-help/m-p/1445836#M211686</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-03T11:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Layout problem needs your help.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-layout-problem-needs-your-help/m-p/1445837#M211687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or you can have one screen with 1 container.  Then in the PBO, check the condition,  if it is satisfied, then you can implement a splitter inside of your custom container,  then implement the two alv grids in the split containers, otherwise just use the original container to house an alv grid.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2006 11:51:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-layout-problem-needs-your-help/m-p/1445837#M211687</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-07-03T11:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Layout problem needs your help.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-layout-problem-needs-your-help/m-p/1445838#M211688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All of you are very helpful to me.&lt;/P&gt;&lt;P&gt;However, Is there any example for my ALV?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_*  there are two many cases &lt;STRONG&gt;_&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2006 11:54:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-layout-problem-needs-your-help/m-p/1445838#M211688</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-03T11:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Layout problem needs your help.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-layout-problem-needs-your-help/m-p/1445839#M211689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Minghan Song ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its possible using Abap Objects where u can define two Alv Controls with the ur specified size parameters. BUt in normal ALV , u can have restriction that grid supports max of 1024 chars only i.e total lenght of all fields should not exceed 1024 chars.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Kiran b&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2006 11:56:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-layout-problem-needs-your-help/m-p/1445839#M211689</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-03T11:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Layout problem needs your help.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-layout-problem-needs-your-help/m-p/1445840#M211690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is simple sample prg...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report alv_gridcontrol message-id zmsg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: ok_code like sy-ucomm,&lt;/P&gt;&lt;P&gt;      gt_sflight type table of sflight,&lt;/P&gt;&lt;P&gt;      g_container type scrfname value 'BCALV_GRID_DEMO_0100_CONT1',&lt;/P&gt;&lt;P&gt;      grid1  type ref to cl_gui_alv_grid,&lt;/P&gt;&lt;P&gt;      g_custom_container type ref to cl_gui_custom_container.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      MAIN                                                          *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from sflight into table gt_sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call screen 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      MODULE PBO OUTPUT                                             *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module pbo output.&lt;/P&gt;&lt;P&gt;  set pf-status space.&lt;/P&gt;&lt;P&gt;  if g_custom_container is initial.&lt;/P&gt;&lt;P&gt;    create object g_custom_container&lt;/P&gt;&lt;P&gt;           exporting container_name = g_container.&lt;/P&gt;&lt;P&gt;    create object grid1&lt;/P&gt;&lt;P&gt;           exporting i_parent = g_custom_container.&lt;/P&gt;&lt;P&gt;    call method grid1-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;      exporting&lt;/P&gt;&lt;P&gt;        i_structure_name = 'SFLIGHT'&lt;/P&gt;&lt;P&gt;      changing&lt;/P&gt;&lt;P&gt;        it_outtab        = gt_sflight.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endmodule.                    "PBO OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      MODULE PAI INPUT                                              *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module pai input.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  to react on oi_custom_events:&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CALL METHOD CL_GUI_CFW=&amp;gt;DISPATCH.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CASE OK_CODE.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WHEN 'EXIT'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     PERFORM EXIT_PROGRAM.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WHEN OTHERS.&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;    do nothing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; ENDCASE.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CLEAR OK_CODE.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call method grid1-&amp;gt;select_text_in_curr_cell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;message i000 with 'HELLO WORLD'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmodule.                    "PAI INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      FORM EXIT_PROGRAM                                             *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form exit_program.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CALL METHOD G_CUSTOM_CONTAINER-&amp;gt;FREE.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CALL METHOD CL_GUI_CFW=&amp;gt;FLUSH.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  leave program.&lt;/P&gt;&lt;P&gt;endform.                    "EXIT_PROGRAM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2006 12:04:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-layout-problem-needs-your-help/m-p/1445840#M211690</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-03T12:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Layout problem needs your help.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-layout-problem-needs-your-help/m-p/1445841#M211691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an example.   This program implements this using a docking container, but can easily be changed to implement into one custom container on your dynpro.  I did it this way for a cut/paste example.   Just copy the code and run.  Select the radiobuttons on the right to switch the layout.  Notice that the alv grids use the same original container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report  zrich_0005.

data: imara type table of mara with header line.
data: it001w type table of t001w with header line.

  data:
        dockingleft  type ref to cl_gui_docking_container,
        dock_sub_cont1   type ref to cl_gui_container,
        dock_sub_cont2   type ref to cl_gui_container,
        splitter     type ref to cl_gui_splitter_container,
        alv_bottom   type ref to cl_gui_alv_grid,
        alv_top     type ref to cl_gui_alv_grid,
        repid type syrepid.

parameters: p_check type c,
            p_rad1 radiobutton group grp1 default 'X' user-command chk,
            p_rad2 radiobutton group grp1.

start-of-selection.

at selection-screen output.



  repid = sy-repid.


  if not dockingleft is initial.
    call method dockingleft-&amp;gt;free.
    clear dockingleft.  free dockingleft.
    call method cl_gui_cfw=&amp;gt;flush.
  endif.

  if p_rad1 = 'X'.
    create object dockingleft
                exporting repid     = repid
                          dynnr     = sy-dynnr
                          side      = dockingleft-&amp;gt;dock_at_left
                          extension = 500.

    create object alv_top
                  exporting i_parent = dockingleft.


* Get data
    select * into corresponding fields of table imara
                from mara
                      where mtart = 'ZNBW'.

* Set first display
    call method alv_top-&amp;gt;set_table_for_first_display
        exporting
             i_structure_name       = 'MARA'
        changing
             it_outtab       = imara[].

  elseif p_rad2 = 'X'.

    create object dockingleft
                exporting repid     = repid
                          dynnr     = sy-dynnr
                          side      = dockingleft-&amp;gt;dock_at_left
                          extension = 500.


    create object splitter
                      exporting parent = dockingleft
                                rows    = 2
                                columns = 1.

    call method:
                    splitter-&amp;gt;get_container
                      exporting row            = 1
                                column         = 1
                                receiving container = dock_sub_cont1,

                    splitter-&amp;gt;set_row_height
                      exporting id             = 1
                                height         = '14',

                    splitter-&amp;gt;get_container
                      exporting row            = 2
                                column         = 1
                                receiving container = dock_sub_cont2.

    create object alv_top
                exporting i_parent =  dock_sub_cont1.

    create object alv_bottom
                exporting i_parent =  dock_sub_cont2.


* Get data
    select * into corresponding fields of table imara
                from mara
                      where mtart = 'ZNBW'.

    select * into corresponding fields of table it001w
                from t001w.

* Set first display
    call method alv_top-&amp;gt;set_table_for_first_display
        exporting
             i_structure_name       = 'MARA'
        changing
             it_outtab       = imara[].


    call method alv_bottom-&amp;gt;set_table_for_first_display
       exporting
            i_structure_name       = 'T001W'
       changing
            it_outtab       = it001w[].


  endif.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2006 12:10:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-layout-problem-needs-your-help/m-p/1445841#M211691</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-07-03T12:10:02Z</dc:date>
    </item>
  </channel>
</rss>

