<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4647644#M1093779</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 will have to pass the sort table to the function reuse_alv_grid.&lt;/P&gt;&lt;P&gt;the table should be of type slis_sortinfo_alv of type group SLIS.&lt;/P&gt;&lt;P&gt;Here you give the sort position, fieldname and table name, sort up or down etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* Sort Criteria
DATA : gt_sort TYPE  slis_t_sortinfo_alv,
       gw_sort  TYPE slis_sortinfo_alv.

  gw_sort-spos = '01'.
  gw_sort-fieldname = 'JOBNAME'.
  gw_sort-tabname = 'I_JOBLOG'.
  gw_sort-up = 'X'.
  gw_sort-group = 'UL'.
  APPEND gw_sort TO gt_sort.

  gw_sort-spos = '02'.
  gw_sort-fieldname = 'JOBCOUNT'.
  gw_sort-tabname = 'I_JOBLOG'.
  gw_sort-up = 'X'.
  gw_sort-group = 'UL'.
  APPEND gw_sort TO gt_sort.

  gw_sort-spos = '03'.
  gw_sort-fieldname = 'ENTERTIME'.
  gw_sort-tabname = 'I_JOBLOG'.
  gw_sort-up = 'X'.
  gw_sort-group = 'UL'.
  APPEND gw_sort TO gt_sort.

  gw_sort-spos = '04'.
  gw_sort-fieldname = 'ENTERDATE'.
  gw_sort-tabname = 'I_JOBLOG'.
  gw_sort-up = 'X'.
  gw_sort-group = 'UL'.
  APPEND gw_sort TO gt_sort.


  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program = e_repid
      is_layout  =     g_layout_jl
      it_fieldcat        = gt_fielcat_jl
*      it_events          = gt_jlevents
      it_sort    =           gt_sort
    TABLES
      t_outtab           = i_joblog
    EXCEPTIONS
      program_error      = 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.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output of the ALV will then be displayed sorted and grouped as you have specified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Advait&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Advait Gode on Oct 20, 2008 10:25 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Oct 2008 08:14:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-20T08:14:44Z</dc:date>
    <item>
      <title>ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4647642#M1093777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;like AT NEW, do we have any option in ALV to display the data for every new field value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Narendra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2008 08:07:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4647642#M1093777</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-20T08:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4647643#M1093778</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;Use sort in ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ramya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2008 08:12:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4647643#M1093778</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-20T08:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4647644#M1093779</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 will have to pass the sort table to the function reuse_alv_grid.&lt;/P&gt;&lt;P&gt;the table should be of type slis_sortinfo_alv of type group SLIS.&lt;/P&gt;&lt;P&gt;Here you give the sort position, fieldname and table name, sort up or down etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* Sort Criteria
DATA : gt_sort TYPE  slis_t_sortinfo_alv,
       gw_sort  TYPE slis_sortinfo_alv.

  gw_sort-spos = '01'.
  gw_sort-fieldname = 'JOBNAME'.
  gw_sort-tabname = 'I_JOBLOG'.
  gw_sort-up = 'X'.
  gw_sort-group = 'UL'.
  APPEND gw_sort TO gt_sort.

  gw_sort-spos = '02'.
  gw_sort-fieldname = 'JOBCOUNT'.
  gw_sort-tabname = 'I_JOBLOG'.
  gw_sort-up = 'X'.
  gw_sort-group = 'UL'.
  APPEND gw_sort TO gt_sort.

  gw_sort-spos = '03'.
  gw_sort-fieldname = 'ENTERTIME'.
  gw_sort-tabname = 'I_JOBLOG'.
  gw_sort-up = 'X'.
  gw_sort-group = 'UL'.
  APPEND gw_sort TO gt_sort.

  gw_sort-spos = '04'.
  gw_sort-fieldname = 'ENTERDATE'.
  gw_sort-tabname = 'I_JOBLOG'.
  gw_sort-up = 'X'.
  gw_sort-group = 'UL'.
  APPEND gw_sort TO gt_sort.


  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program = e_repid
      is_layout  =     g_layout_jl
      it_fieldcat        = gt_fielcat_jl
*      it_events          = gt_jlevents
      it_sort    =           gt_sort
    TABLES
      t_outtab           = i_joblog
    EXCEPTIONS
      program_error      = 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.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output of the ALV will then be displayed sorted and grouped as you have specified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Advait&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Advait Gode on Oct 20, 2008 10:25 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2008 08:14:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4647644#M1093779</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-20T08:14:44Z</dc:date>
    </item>
  </channel>
</rss>

