<?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: Regarding SALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-salv/m-p/2988614#M705849</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please review this example, notice here that since I am defining the internal table manually using the TYPES statement, that means I also have to tell the ALV that the DISTID(uom field) is the UOM field for the field DISTANCE.  I believe that you will need to do something simular.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


REPORT  zrich_0001.


Types: begin of t_spfli,
       CARRID type spfli-carrid,
       CONNID type spfli-connid,
       COUNTRYFR type spfli-countryfr,
       CITYFROM type spfli-cityfrom,
       AIRPFROM type spfli-airpfrom,
       COUNTRYTO type spfli-countryto,
       CITYTO type spfli-cityto,
       AIRPTO type spfli-airpto,
       FLTIME type spfli-fltime,
       DEPTIME type spfli-deptime,
       ARRTIME type spfli-arrtime,
       DISTANCE type spfli-distance,
       DISTID type spfli-distid,
       end of t_spfli.

data: ispfli type table of t_spfli.

data: gr_table     type ref to cl_salv_table.
data: gr_functions type ref to cl_salv_functions.
data: gr_display   type ref to cl_salv_display_settings.
data: gr_columns   type ref to cl_salv_columns_table.
data: gr_column    type ref to cl_salv_column_table.
data: gr_sorts     type ref to cl_salv_sorts.
data: gr_agg       type ref to cl_salv_aggregations.


start-of-selection.

  select * into CORRESPONDING FIELDS OF TABLE ispfli from spfli.


  cl_salv_table=&amp;gt;factory( importing r_salv_table = gr_table
                           changing t_table      = ispfli ).

  gr_functions = gr_table-&amp;gt;get_functions( ).
  gr_functions-&amp;gt;set_all( abap_true ).


* Tell the ALV that the DISTID is the UOM field for the DISTANCE field.
  gr_columns = gr_table-&amp;gt;get_columns( ).
  gr_column ?= gr_columns-&amp;gt;get_column( 'DISTANCE' ).
  gr_column-&amp;gt;SET_QUANTITY_COLUMN( 'DISTID' ).


  gr_sorts = gr_table-&amp;gt;get_sorts( ).
  gr_sorts-&amp;gt;add_sort( columnname = 'CITYTO' subtotal = abap_true ).

  gr_agg = gr_table-&amp;gt;get_aggregations( ).
  gr_agg-&amp;gt;add_aggregation( 'DISTANCE' ).

  gr_table-&amp;gt;display( ).

&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>Fri, 26 Oct 2007 16:21:56 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2007-10-26T16:21:56Z</dc:date>
    <item>
      <title>Regarding SALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-salv/m-p/2988613#M705848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I'm using SALV to display a list. I'm using aggregation function for MENGE field.&lt;/P&gt;&lt;P&gt;But the list displayed is not the showing the Unit of measure field after aggregation.&lt;/P&gt;&lt;P&gt;Can u please tell me how to display it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Santhosh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Santhosh DS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2007 14:59:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-salv/m-p/2988613#M705848</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-26T14:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding SALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-salv/m-p/2988614#M705849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please review this example, notice here that since I am defining the internal table manually using the TYPES statement, that means I also have to tell the ALV that the DISTID(uom field) is the UOM field for the field DISTANCE.  I believe that you will need to do something simular.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


REPORT  zrich_0001.


Types: begin of t_spfli,
       CARRID type spfli-carrid,
       CONNID type spfli-connid,
       COUNTRYFR type spfli-countryfr,
       CITYFROM type spfli-cityfrom,
       AIRPFROM type spfli-airpfrom,
       COUNTRYTO type spfli-countryto,
       CITYTO type spfli-cityto,
       AIRPTO type spfli-airpto,
       FLTIME type spfli-fltime,
       DEPTIME type spfli-deptime,
       ARRTIME type spfli-arrtime,
       DISTANCE type spfli-distance,
       DISTID type spfli-distid,
       end of t_spfli.

data: ispfli type table of t_spfli.

data: gr_table     type ref to cl_salv_table.
data: gr_functions type ref to cl_salv_functions.
data: gr_display   type ref to cl_salv_display_settings.
data: gr_columns   type ref to cl_salv_columns_table.
data: gr_column    type ref to cl_salv_column_table.
data: gr_sorts     type ref to cl_salv_sorts.
data: gr_agg       type ref to cl_salv_aggregations.


start-of-selection.

  select * into CORRESPONDING FIELDS OF TABLE ispfli from spfli.


  cl_salv_table=&amp;gt;factory( importing r_salv_table = gr_table
                           changing t_table      = ispfli ).

  gr_functions = gr_table-&amp;gt;get_functions( ).
  gr_functions-&amp;gt;set_all( abap_true ).


* Tell the ALV that the DISTID is the UOM field for the DISTANCE field.
  gr_columns = gr_table-&amp;gt;get_columns( ).
  gr_column ?= gr_columns-&amp;gt;get_column( 'DISTANCE' ).
  gr_column-&amp;gt;SET_QUANTITY_COLUMN( 'DISTID' ).


  gr_sorts = gr_table-&amp;gt;get_sorts( ).
  gr_sorts-&amp;gt;add_sort( columnname = 'CITYTO' subtotal = abap_true ).

  gr_agg = gr_table-&amp;gt;get_aggregations( ).
  gr_agg-&amp;gt;add_aggregation( 'DISTANCE' ).

  gr_table-&amp;gt;display( ).

&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>Fri, 26 Oct 2007 16:21:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-salv/m-p/2988614#M705849</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-10-26T16:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding SALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-salv/m-p/2988615#M705850</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;Rich. Thanks for new info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gr_column-&amp;gt;SET_QUANTITY_COLUMN( 'DISTID' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2007 16:44:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-salv/m-p/2988615#M705850</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-10-26T16:44:49Z</dc:date>
    </item>
  </channel>
</rss>

