<?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 grid display in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479595#M224594</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Johnn, you will need to get your data again from the db and put into your internal table that is tied to the ALV grid.  You need to get the data based on the new date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please be sure to award points for helpful answers and mark your post as solved when solved completely.  Thanks and welcome to SDN!&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>Fri, 01 Sep 2006 14:28:00 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-09-01T14:28:00Z</dc:date>
    <item>
      <title>ALV grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479586#M224585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date is the main selection criteria in my selection screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once the user gets the ALV grid display output screen, he should be able to forward or backward the date&lt;/P&gt;&lt;P&gt;so accordingly the display changes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So req is, i should create two pushbuttons in that ALV grid display output screen where user can forward or backward the date directly, no need to go back to the selection screen once again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i handle this......&lt;/P&gt;&lt;P&gt;sample code plz..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2006 14:18:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479586#M224585</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-30T14:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479587#M224586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of creating push buttons , u can make the date fields as editable fields and create F4 help for the date fields so that you can select the dates&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2006 14:22:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479587#M224586</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-30T14:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479588#M224587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Johnn,  you can accomplish this by using the CL_GUI_ALV_GRID class and embeding the ALV Grid in a screen container.  Then add your buttons to the application toolbar by creating your gui status,  then when the user clicks one of the buttons, get the new data and "Refresh" the ALV grid using the REFRESH method.&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>Wed, 30 Aug 2006 14:24:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479588#M224587</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-30T14:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479589#M224588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ON the top of output display screen, user want that pushbutton so he dont want to go back to selection screen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2006 14:25:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479589#M224588</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-30T14:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479590#M224589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;You need to REFRESH In the ALV,&lt;/P&gt;&lt;P&gt;In ALV, to refresh the table you have to call the method "refresh_table_display".  &lt;/P&gt;&lt;P&gt;It has the syntax very similar to creating the table.  &lt;/P&gt;&lt;P&gt;It has two parameters. In the first one, you can mention if you want to refresh only the data (the icons are not refreshed)  &lt;/P&gt;&lt;P&gt;or  &lt;/P&gt;&lt;P&gt;if you want to refresh only the icons around the grid (the data is not refreshed - this option is mostly not used in day to day applications). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the synatx is :- &lt;/P&gt;&lt;P&gt;call method grid (name of grid )-&amp;gt;refresh_table_display &lt;/P&gt;&lt;P&gt;exporting &lt;/P&gt;&lt;P&gt;IS_STABLE = &amp;lt;STRUCT OF TYPE LVC_S_STBL&amp;gt; (THIS IS FOR DATA REFRESHING) &lt;/P&gt;&lt;P&gt;I_SOFT_REFRESH = &amp;lt;VARIABLE OF CHAR 01&amp;gt;  (THIS IS FOR ICON REFRESHING).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the below link for Autorefresh Example program:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-basis-abap.com/abap/auto-refresh-alv-list.htm" target="test_blank"&gt;http://www.sap-basis-abap.com/abap/auto-refresh-alv-list.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;similarly you can write the program,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at the Thread also:&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1121906"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2006 14:29:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479590#M224589</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-30T14:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479591#M224590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u please give me some sample code ........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2006 14:34:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479591#M224590</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-30T14:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479592#M224591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Johnn,  here is a sample program.  Which should give you some idea.  THere is a parameter on the selection screen which is for the number of rows to display.  Default should be 10.  You will need to create a screen 100, and put the custom container on this screen and name it as "ALV_CONTAINER".  Also put two push buttons for "Reverse" and "Forward" make sure to assign the corresponding FCODEs for these buttons.  Run the program, now enter 10 for the parameter and execute, an ALV grid will be display with 10 rows, click the "Forward" button and you will see that it just added 10 more rows and refreshed the ALV, now click the Reverse button, it now took away those 10 rows.  This program should help you in your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

tables: mara.

data: begin of i_alv occurs 0,
      rows type i,
      valu type i,
      end of i_alv.

data: alv_container  type ref to cl_gui_custom_container.
data: alv_grid       type ref to cl_gui_alv_grid.
data: layout    type lvc_s_layo.
data: fieldcat  type lvc_t_fcat.
data: ok_code type sy-ucomm.
data: save_ok type sy-ucomm.

selection-screen begin of block b1 with frame title text-001 .
parameters: p_rows type i.
selection-screen end of block b1.

start-of-selection.

  perform set_data.
  call screen 100.

************************************************************************
*      Module  status_0100  OUTPUT
************************************************************************
module status_0100 output.
  set pf-status '0100'.
  set titlebar '0100'.

check alv_container is initial.

* Create Controls
  create object alv_container
         exporting
               container_name    = 'ALV_CONTAINER'.

  create object alv_grid
         exporting
               i_parent          =  alv_container.

*  ALV Specific. Data selection.
*  Populate Field Catalog
  perform get_fieldcatalog.

  call method alv_grid-&amp;gt;set_table_for_first_display
      exporting
           is_layout              = layout
      changing
           it_outtab       = i_alv[]
           it_fieldcatalog = fieldcat[].

endmodule.

************************************************************************
*      Module  USER_COMMAND_0100  INPUT
************************************************************************
module user_command_0100 input.

  save_ok = ok_code.

  case ok_code.
    when 'BACK' or 'CANC'.
      clear ok_code.
      if not alv_container is initial.
        call method alv_container-&amp;gt;free.
        clear: alv_container.
        free : alv_container.
      endif.
      if sy-subrc = 0.
        set screen 0.
        leave screen.
      else.
        leave program.
      endif.
    when 'EXIT'.
      clear ok_code.
      if not alv_container is initial.
        call method alv_container-&amp;gt;free.
        clear: alv_container.
        free : alv_container.
      endif.
      leave program.
&amp;lt;b&amp;gt;    when 'REVE'.
      clear ok_code.
      p_rows = p_rows - 10.
      perform set_data.
      call method alv_grid-&amp;gt;refresh_table_display.

    when 'FORW'.
      clear ok_code.
      p_rows = p_rows + 10.
      perform set_data.
      call method alv_grid-&amp;gt;refresh_table_display.&amp;lt;/b&amp;gt;

  endcase.

endmodule.

************************************************************************
* FORM GET_DATA
************************************************************************
form set_data.

  clear i_alv.  refresh i_alv.

  if p_rows &amp;lt; 10.
    p_rows = 10.
  endif.

  do p_rows times.
    i_alv-rows = sy-index.
    i_alv-valu = sy-index * 100.
    append i_alv.
  enddo.

endform.

************************************************************************
*      Form  Get_Fieldcatalog - Set Up Columns/Headers
************************************************************************
form get_fieldcatalog.

  data: ls_fcat type lvc_s_fcat.
  refresh fieldcat.

  clear ls_fcat.
  ls_fcat-reptext    = 'Row Number'.
  ls_fcat-coltext    = 'Row Number'.
  ls_fcat-fieldname  = 'ROWS'.
  ls_fcat-ref_table  = 'I_ALV'.
  ls_fcat-outputlen  = '5'.
  append ls_fcat to fieldcat.

  clear ls_fcat.
  ls_fcat-reptext    = 'Value'.
  ls_fcat-coltext    = 'Value'.
  ls_fcat-fieldname  = 'VALU'.
  ls_fcat-ref_table  = 'I_ALV'.
  ls_fcat-outputlen  = '5'.
  append ls_fcat to fieldcat.


endform.

&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>Wed, 30 Aug 2006 15:28:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479592#M224591</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-30T15:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479593#M224592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This sample code is really helpful, i need to execute &amp;amp; check.&lt;/P&gt;&lt;P&gt;What should be created in the screen 100 apart from the &lt;/P&gt;&lt;P&gt;Pushbutton.&lt;/P&gt;&lt;P&gt;Please reply me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2006 09:28:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479593#M224592</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-31T09:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479594#M224593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i can create the pushbutton in the application toolbar.&lt;/P&gt;&lt;P&gt;i can forward &amp;amp; reverse the date.&lt;/P&gt;&lt;P&gt;but how i can change the display according to the date.&lt;/P&gt;&lt;P&gt;plz help me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Sep 2006 14:24:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479594#M224593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-01T14:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479595#M224594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Johnn, you will need to get your data again from the db and put into your internal table that is tied to the ALV grid.  You need to get the data based on the new date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please be sure to award points for helpful answers and mark your post as solved when solved completely.  Thanks and welcome to SDN!&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>Fri, 01 Sep 2006 14:28:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479595#M224594</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-09-01T14:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479596#M224595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can i use the submit syntax like this to get the new data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; SUBMIT /RB04/yl4_ns_LODWH_CRESS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH STRUKT  = MEM_STRUKT&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH DBNAME  = DB_NAME&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH ANZ_REC = ANZ_REC&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH TAB_NEU = TAB_NEU&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH DATNAME = P_DATNA1&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because the internal table i am passing to alv grid has no date field&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Sep 2006 14:37:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479596#M224595</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-01T14:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479597#M224596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;?   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are filling this internal table with data at some point in your program.  I assume that you are filling it based on some date.  When you click on the "forward" button you now want to fill the internal table with data for the new date calculated when you push the button right?  So do the same select statement which filled the ALV grid internal table eariler, only with this new date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or am I missing something.&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>Fri, 01 Sep 2006 14:50:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1479597#M224596</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-09-01T14:50:27Z</dc:date>
    </item>
  </channel>
</rss>

