<?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 SET_TABLE_FOR_FIRST_DISPLAY in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473426#M1253307</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u explain bit more clear   ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Apr 2009 05:23:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-17T05:23:30Z</dc:date>
    <item>
      <title>Problem with SET_TABLE_FOR_FIRST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473425#M1253306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am Displaying the Data in Grid Using  SET_TABLE_FOR_FIRST_DISPLAY .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; In my reqirement i need to edit one field and need to click on calculate button.then the claculated value should be displayed in other field . &lt;/P&gt;&lt;P&gt;so i have used CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'.&lt;/P&gt;&lt;P&gt;and captured the values in final output table with calculated value but while displaying the calculated valus is not displaying in Grid Once i click on Refresh then only it's coming into Grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to Solve my problem ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Laxmi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 05:14:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473425#M1253306</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-17T05:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SET_TABLE_FOR_FIRST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473426#M1253307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u explain bit more clear   ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 05:23:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473426#M1253307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-17T05:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SET_TABLE_FOR_FIRST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473427#M1253308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Laxmi,&lt;/P&gt;&lt;P&gt;What I have understood from your query is; you got to display the calculated value dynamically in another box on a grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a similar kind of requirement, please follow it, you'll get to solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this program the field Price of sflight is editable and when you edit the price this price is modified with modifying the value in the cost column also that has been added in the field sting of the table. When you press enter the values are changed. This example will help u to trance the changed value and then modify other values according to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Laxmi, there's pretty problem in displaying the code as Code, please overlook formatting, copy and try out the code given below)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Get Changed Value in ALV Grid Dynamically.|https://wiki.sdn.sap.com/wiki/x/tgCrBQ ]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps resolve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Zahack&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Zahack on Apr 17, 2009 7:36 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 05:24:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473427#M1253308</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-17T05:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SET_TABLE_FOR_FIRST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473428#M1253309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Laxmi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you are done with the calculation and captured the value in the internal table...just call the method 'REFRESH_TABLE_DISPLAY'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this resolves your query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nikhil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 05:28:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473428#M1253309</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-17T05:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SET_TABLE_FOR_FIRST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473429#M1253310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;    It's very Simple.... use CHECK_CHANGED_DATA..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;classs name &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; DATA : REF1 TYPE REF TO CL_GUI_ALV_GRID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'&lt;/P&gt;&lt;P&gt;        IMPORTING&lt;/P&gt;&lt;P&gt;          E_GRID = REF1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*check change data &lt;/P&gt;&lt;P&gt;      CALL METHOD REF1-&amp;gt;CHECK_CHANGED_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Salil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 09:49:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473429#M1253310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-17T09:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SET_TABLE_FOR_FIRST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473430#M1253311</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;If using OO ALV, then use this code when you click SAVE button:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CASE sy-ucomm.
  WHEN 'SAVE'.
* to reflect the data changed into internal table
    DATA : ref_grid TYPE REF TO cl_gui_alv_grid. "new
 
    IF ref_grid IS INITIAL.
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = ref_grid.
    ENDIF.
 
    IF NOT ref_grid IS INITIAL.
      CALL METHOD ref_grid-&amp;gt;check_changed_data.
    ENDIF.

    " and then use refresh_table_display
    CALL METHOD ref_grid-&amp;gt;refresh_table_display.
    " to refresh the data from internal table back to alv output.
 
ENDCASE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 09:53:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473430#M1253311</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-04-17T09:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SET_TABLE_FOR_FIRST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473431#M1253312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your replies...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whenever i have used check_changed_data it's going to dump.What might be the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;P&gt;Laxmi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 10:11:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473431#M1253312</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-17T10:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SET_TABLE_FOR_FIRST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473432#M1253313</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;If you are following the code in my previous reply, then there seems no reason that it should give a dump.&lt;/P&gt;&lt;P&gt;Check it once again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 10:15:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473432#M1253313</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-04-17T10:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SET_TABLE_FOR_FIRST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473433#M1253314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tarun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for reply . I have copied the same as you said Now am getting dump at  this method..&lt;/P&gt;&lt;P&gt; CALL METHOD grid1-&amp;gt;refresh_table_display. wat might be the reason?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank,&lt;/P&gt;&lt;P&gt;laxmi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 10:40:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473433#M1253314</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-17T10:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SET_TABLE_FOR_FIRST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473434#M1253315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Hi Tarun,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Thank you for reply . I have copied the same as you said Now am getting dump at  this method..&lt;/P&gt;&lt;P&gt;&amp;gt;  CALL METHOD grid1-&amp;gt;refresh_table_display. wat might be the reason?&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Thank,&lt;/P&gt;&lt;P&gt;&amp;gt; laxmi&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"ALV GRID CONTAINER
DATA : z_grid TYPE REF TO cl_gui_alv_grid.

CALL METHOD z_grid-&amp;gt;refresh_table_display
  EXCEPTIONS
    finished       = 1
    others         = 2.
IF sy-subrc &amp;lt;&amp;gt; 0.
  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same code works absolutely fine in my alv report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I cant really find any reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 11:23:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473434#M1253315</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-04-17T11:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SET_TABLE_FOR_FIRST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473435#M1253316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tarun ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can You give the Small Ref Program For me . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Laxmi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 11:49:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473435#M1253316</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-17T11:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SET_TABLE_FOR_FIRST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473436#M1253317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Laxmi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 12:17:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473436#M1253317</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-17T12:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SET_TABLE_FOR_FIRST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473437#M1253318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Hi Tarun ,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Can You give the Small Ref Program For me . &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Thanks,&lt;/P&gt;&lt;P&gt;&amp;gt; Laxmi&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Refer:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*          PARAMETERS DECLARATION
*&amp;amp;---------------------------------------------------------------------*
PARAMETERS : z_ebeln TYPE ekpo-ebeln.

*&amp;amp;---------------------------------------------------------------------*
*          TYPE DECLARATION
*&amp;amp;---------------------------------------------------------------------*
TYPES : BEGIN OF t_ekpo,
        ebeln TYPE ekpo-ebeln,
        ebelp TYPE ekpo-ebelp,
        matnr TYPE ekpo-matnr,
        werks TYPE ekpo-werks,
        menge TYPE ekpo-menge,
        END OF t_ekpo.

*&amp;amp;---------------------------------------------------------------------*
*          DATA DECLARATION
*&amp;amp;---------------------------------------------------------------------*

DATA : rep_name TYPE sy-repid,
       check(1),
       rep(25),
       ok_code TYPE sy-ucomm.

*INTERNAL TABLE
DATA : it_ekpo TYPE STANDARD TABLE OF t_ekpo.

*NAME OF CUSTOM CONTAINER ADDED ON SCREEN
DATA : z_container TYPE scrfname VALUE 'PO_CONTAINER'.

DATA : z_custom_container TYPE REF TO cl_gui_custom_container.

*ALV GRID CONTAINER
DATA : z_grid TYPE REF TO cl_gui_alv_grid.

*FIELD CATALOG
DATA : it_fieldcat TYPE lvc_t_fcat,
       wa_fieldcat TYPE lvc_s_fcat.

*LAYOUT
DATA : wa_layout TYPE lvc_s_layo.

*&amp;amp;---------------------------------------------------------------------*
*          INITIALIZATION
*&amp;amp;---------------------------------------------------------------------*
INITIALIZATION.
  rep_name = sy-repid.
  check = 'X'.
  CONCATENATE text-001 rep_name INTO rep SEPARATED BY space.

*----------------------------------------------------------------------*
*       CLASS lcl_oo_alv DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_oo_alv DEFINITION.
  PUBLIC SECTION.
    METHODS populate_itab IMPORTING ebeln TYPE zekpo-ebeln.
    METHODS create_field_catalog.
    METHODS create_layout.
    METHODS display_alv.
    METHODS refresh_alv.

  PRIVATE SECTION.
    DATA : po TYPE zekpo-ebeln.

ENDCLASS.                    "lcl_oo_alv DEFINITION

*----------------------------------------------------------------------*
*       CLASS lcl_oo_alv IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_oo_alv IMPLEMENTATION.

  METHOD populate_itab.
    me-&amp;gt;po = ebeln.

    SELECT ebeln
       ebelp
       matnr
       werks
       menge
       FROM ekpo
       INTO TABLE it_ekpo
       WHERE ebeln EQ po.
  ENDMETHOD.                    "populate_itab

  METHOD create_field_catalog.
    wa_fieldcat-fieldname = 'EBELN'.
    wa_fieldcat-coltext = 'PO #'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.

    wa_fieldcat-fieldname = 'EBELP'.
    wa_fieldcat-coltext = 'Item'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.

    wa_fieldcat-fieldname = 'MATNR'.
    wa_fieldcat-coltext = 'Material'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.

    wa_fieldcat-fieldname = 'WERKS'.
    wa_fieldcat-coltext = 'Plant'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.

    wa_fieldcat-fieldname = 'MENGE'.
    wa_fieldcat-coltext = 'Qty.'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
  ENDMETHOD.                    "create_field_catalog

  METHOD create_layout.
    wa_layout-grid_title = rep.
    wa_layout-zebra = check.
  ENDMETHOD.                    "create_layout

  METHOD display_alv.

    CALL METHOD z_grid-&amp;gt;set_table_for_first_display
    EXPORTING
*    i_buffer_active               =
*    i_bypassing_buffer            =
*    i_consistency_check           =
*    i_structure_name              =
*    is_variant                    =
*    i_save                        =
*    i_default                     = 'X'
      is_layout                     = wa_layout
*    is_print                      =
*    it_special_groups             =
*    it_toolbar_excluding          =
*    it_hyperlink                  =
*    it_alv_graphics               =
*    it_except_qinfo               =
*    ir_salv_adapter               =
    CHANGING
      it_outtab                     = it_ekpo
      it_fieldcatalog               = it_fieldcat
*    it_sort                       =
*    it_filter                     =
*  EXCEPTIONS
*    invalid_parameter_combination = 1
*    program_error                 = 2
*    too_many_lines                = 3
*    others                        = 4
          .
    IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  ENDMETHOD.                    "display_alv

  METHOD refresh_alv.

    REFRESH it_ekpo.

    SELECT ebeln
           ebelp
           matnr
           werks
           menge
           FROM zekpo
           INTO TABLE it_ekpo.


    CALL METHOD z_grid-&amp;gt;refresh_table_display
*  EXPORTING
*    is_stable      =
*    i_soft_refresh =
*  EXCEPTIONS
*    finished       = 1
*    others         = 2
            .
    IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.


  ENDMETHOD.                    "refresh_alv

ENDCLASS.                    "lcl_oo_alv IMPLEMENTATION

*&amp;amp;---------------------------------------------------------------------*
*          CLASS INSTANCE VARIABLE
*&amp;amp;---------------------------------------------------------------------*
DATA : obj1 TYPE REF TO lcl_oo_alv.

*&amp;amp;---------------------------------------------------------------------*
*          START OF SELECTION
*&amp;amp;---------------------------------------------------------------------*
START-OF-SELECTION.

*CREATE OBJECT
  CREATE OBJECT : obj1.

  CALL METHOD obj1-&amp;gt;populate_itab
    EXPORTING
      ebeln = z_ebeln.

*&amp;amp;---------------------------------------------------------------------*
*          CALL SCREEN
*&amp;amp;---------------------------------------------------------------------*
  CALL SCREEN 1011.

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  STATUS_1010  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE status_1011 OUTPUT.
  SET PF-STATUS '1011'.
*  SET TITLEBAR 'xxx'.

*CUSTOM CONTAINER INSTANCE
  CREATE OBJECT z_custom_container
    EXPORTING
*           parent                      =
      container_name              = z_container
*           style                       =
*           lifetime                    = lifetime_default
*           repid                       =
*           dynnr                       =
*           no_autodef_progid_dynnr     =
*         EXCEPTIONS
*           cntl_error                  = 1
*           cntl_system_error           = 2
*           create_error                = 3
*           lifetime_error              = 4
*           lifetime_dynpro_dynpro_link = 5
*           others                      = 6
      .
  IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

*ALV GRID INSTANCE
  CREATE OBJECT z_grid
    EXPORTING
*    i_shellstyle      = 0
*    i_lifetime        =
      i_parent          = z_custom_container
*    i_appl_events     = space
*    i_parentdbg       =
*    i_applogparent    =
*    i_graphicsparent  =
*    i_name            =
*    i_fcat_complete   = space
*  EXCEPTIONS
*    error_cntl_create = 1
*    error_cntl_init   = 2
*    error_cntl_link   = 3
*    error_dp_create   = 4
*    others            = 5
      .
  IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

  CALL METHOD obj1-&amp;gt;create_field_catalog.

  CALL METHOD obj1-&amp;gt;create_layout.

  CALL METHOD obj1-&amp;gt;display_alv.

ENDMODULE.                 " STATUS_1010  OUTPUT

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  USER_COMMAND_1010  INPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE user_command_1011 INPUT.

  ok_code = sy-ucomm.

  CASE ok_code.

    WHEN 'REFRESH'.
      CALL METHOD obj1-&amp;gt;refresh_alv.

    WHEN 'BACK'.
      LEAVE TO SCREEN 0.

    WHEN 'EXIT'.
      LEAVE PROGRAM.

  ENDCASE.

ENDMODULE.                 " USER_COMMAND_1010  INPUT
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 12:28:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-set-table-for-first-display/m-p/5473437#M1253318</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-04-17T12:28:38Z</dc:date>
    </item>
  </channel>
</rss>

