<?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: Problem with custom container (ALV) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-custom-container-alv/m-p/5427478#M1245484</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution is quite simple: you need to "attach" your custom container to a custom control element on the screen. Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA o_custom_container TYPE REF TO cl_gui_custom_container.
CREATE OBJECT o_custom_container
  EXPORTING container_name = 'ZSD'.  " &amp;lt;&amp;lt;&amp;lt; screen must contain custom control with name = 'ZSD'
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Mar 2009 19:45:42 GMT</pubDate>
    <dc:creator>uwe_schieferstein</dc:creator>
    <dc:date>2009-03-25T19:45:42Z</dc:date>
    <item>
      <title>Problem with custom container (ALV)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-custom-container-alv/m-p/5427474#M1245480</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;I am a beginner in OO ALV, i am facing a problem in using cutom container to display ALV grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am creating a custom container as follows:&lt;/P&gt;&lt;P&gt;DATA o_custom_container TYPE REF TO cl_gui_custom_container.&lt;/P&gt;&lt;P&gt;CREATE OBJECT o_custom_container&lt;/P&gt;&lt;P&gt;    EXPORTING container_name  = 'ZSD'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that i am creating a grid and calling the method for display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i use docking container instead of custom, everything works fine but with custom &lt;/P&gt;&lt;P&gt;container, a blank screen is displayed. Nothing is displayed in output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest a relevant solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 13:56:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-custom-container-alv/m-p/5427474#M1245480</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T13:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with custom container (ALV)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-custom-container-alv/m-p/5427475#M1245481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DATA o_custom_container TYPE REF TO cl_gui_custom_container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PBO:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CREATE OBJECT o_custom_container
EXPORTING container_name = 'ZSD'.

 Container on the srceen should have name ZSD .

 create object t_grid
    exporting
      i_parent          = o_custom_container.

T_GRID-&amp;gt;SET_TABLE_FOR_FIRST_DISPLAY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Reference|https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/a%252bsimple%252bprogram%252bon%252balv%252boops]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gurpreet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 15:55:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-custom-container-alv/m-p/5427475#M1245481</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T15:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with custom container (ALV)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-custom-container-alv/m-p/5427476#M1245482</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;Refer to this link..https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/abap-7&lt;EM&gt;Steps&lt;/EM&gt;to&lt;EM&gt;create&lt;/EM&gt;OOPS+ALV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 16:04:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-custom-container-alv/m-p/5427476#M1245482</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T16:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with custom container (ALV)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-custom-container-alv/m-p/5427477#M1245483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can refer to the below code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
" Create Event Receiver
    CREATE OBJECT lv_event_receiver1.

" Create custom container
    CREATE OBJECT v_contan
      EXPORTING
        container_name              = v_gcntrl
      EXCEPTIONS
        cntl_error                  = 1
        cntl_system_error           = 2
        create_error                = 3
        lifetime_error              = 4
        lifetime_dynpro_dynpro_link = 5.

    IF sy-subrc EQ 0.
" Populate ALV control: Variant structure
    w_varnt-report     = sy-repid.      " Program name


" Add the event with instance of controller
    SET HANDLER lv_event_receiver1-&amp;gt;double_click FOR v_gridc.
    SET HANDLER lv_event_receiver1-&amp;gt;top_of_page  FOR v_gridc.

" Call the first Display mode
    CALL METHOD v_gridc-&amp;gt;set_table_for_first_display
      EXPORTING
        i_structure_name = 'T_MATNR'
        is_variant       = w_varnt   " Variant
      CHANGING
        it_outtab        = t_matnr
        it_fieldcatalog  = t_fieldcat.

" Call method to refresh table display
    CALL METHOD v_gridc-&amp;gt;refresh_table_display.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more reference, you can check program :&lt;/P&gt;&lt;P&gt;BCALV_GRID_01 -&amp;gt; BCALV_GRID_11 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check any of the above program. This will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kuntal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 16:06:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-custom-container-alv/m-p/5427477#M1245483</guid>
      <dc:creator>former_member376453</dc:creator>
      <dc:date>2009-03-25T16:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with custom container (ALV)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-custom-container-alv/m-p/5427478#M1245484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution is quite simple: you need to "attach" your custom container to a custom control element on the screen. Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA o_custom_container TYPE REF TO cl_gui_custom_container.
CREATE OBJECT o_custom_container
  EXPORTING container_name = 'ZSD'.  " &amp;lt;&amp;lt;&amp;lt; screen must contain custom control with name = 'ZSD'
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 19:45:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-custom-container-alv/m-p/5427478#M1245484</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2009-03-25T19:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with custom container (ALV)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-custom-container-alv/m-p/5427479#M1245485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data : lcl_w_custom_cont type ref to cl_gui_custom_container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform create_top_con.&lt;/P&gt;&lt;P&gt;    perform create_grid_con.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form create_top_con.&lt;/P&gt;&lt;P&gt;  create object lcl_w_custom_cont&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      container_name = 'CUSTOM'.&lt;/P&gt;&lt;P&gt;  create object lcl_dyndoc_id&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      style = 'ALV_GRID'.&lt;/P&gt;&lt;P&gt;  create object lcl_splitter&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      parent  = lcl_w_custom_cont&lt;/P&gt;&lt;P&gt;      rows    = 2&lt;/P&gt;&lt;P&gt;      columns = 1.&lt;/P&gt;&lt;P&gt;  call method lcl_splitter-&amp;gt;get_container&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      row       = 1&lt;/P&gt;&lt;P&gt;      column    = 1&lt;/P&gt;&lt;P&gt;    receiving&lt;/P&gt;&lt;P&gt;      container = lcl_top_cont.&lt;/P&gt;&lt;P&gt;  call method lcl_splitter-&amp;gt;get_container&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      row       = 2&lt;/P&gt;&lt;P&gt;      column    = 1&lt;/P&gt;&lt;P&gt;    receiving&lt;/P&gt;&lt;P&gt;      container = lcl_grid_cont.&lt;/P&gt;&lt;P&gt;  call method lcl_splitter-&amp;gt;set_row_height&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      id     = 1&lt;/P&gt;&lt;P&gt;      height = 24.&lt;/P&gt;&lt;P&gt;endform.               &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form create_grid_con.&lt;/P&gt;&lt;P&gt;  create object lcl_alv&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      i_parent = lcl_grid_cont.&lt;/P&gt;&lt;P&gt;  create object handler_event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps u.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2009 10:30:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-custom-container-alv/m-p/5427479#M1245485</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-26T10:30:29Z</dc:date>
    </item>
  </channel>
</rss>

