<?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 ALV List Display Problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-problem/m-p/934939#M61745</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; &lt;/P&gt;&lt;P&gt;     Please help me in finding out this. I need the alv output in this format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Material      Brand&lt;/P&gt;&lt;P&gt;10000         B100&lt;/P&gt;&lt;P&gt;empty         B101&lt;/P&gt;&lt;P&gt;empty         B102&lt;/P&gt;&lt;P&gt;10001         C100&lt;/P&gt;&lt;P&gt;empty         C101&lt;/P&gt;&lt;P&gt;Actually the brand no is coming to the corner. so i specified the material as empty.In the empty place i dont want anything.&lt;/P&gt;&lt;P&gt;How to do this in alv list display. If it is not possible in ALV List display guide me in Grid display.Its urgent.&lt;/P&gt;&lt;P&gt;Thanks a lot guys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Vijay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Jul 2005 15:02:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-07-28T15:02:08Z</dc:date>
    <item>
      <title>ALV List Display Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-problem/m-p/934939#M61745</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; &lt;/P&gt;&lt;P&gt;     Please help me in finding out this. I need the alv output in this format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Material      Brand&lt;/P&gt;&lt;P&gt;10000         B100&lt;/P&gt;&lt;P&gt;empty         B101&lt;/P&gt;&lt;P&gt;empty         B102&lt;/P&gt;&lt;P&gt;10001         C100&lt;/P&gt;&lt;P&gt;empty         C101&lt;/P&gt;&lt;P&gt;Actually the brand no is coming to the corner. so i specified the material as empty.In the empty place i dont want anything.&lt;/P&gt;&lt;P&gt;How to do this in alv list display. If it is not possible in ALV List display guide me in Grid display.Its urgent.&lt;/P&gt;&lt;P&gt;Thanks a lot guys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Vijay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2005 15:02:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-problem/m-p/934939#M61745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-28T15:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: ALV List Display Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-problem/m-p/934940#M61746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the grid display,  just sort on the material field.  I am not sure if this works in the list display.  &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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2005 15:04:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-problem/m-p/934940#M61746</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-07-28T15:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: ALV List Display Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-problem/m-p/934941#M61747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a sample program which implements a sort programatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0004
       no standard page heading.

type-pools slis.

data: fieldcat type slis_t_fieldcat_alv.
data: sort     type slis_t_sortinfo_alv.

data: begin of imara occurs 0,
      matnr type mara-matnr,
      labor type mara-labor,
      end of imara.

* Selection Screen
selection-screen begin of block b1 with frame title text-001 .
select-options: s_matnr for imara-matnr .
selection-screen end of block b1.

start-of-selection.

  perform get_data.
  perform write_report.

************************************************************************
*  Get_Data
************************************************************************
form get_data.

  select  mara~matnr mara~matkl mara~labor mara~brgew makt~maktx
            into corresponding fields of table imara
              from mara
               inner join makt
                 on mara~matnr = makt~matnr
                    where mara~matnr in s_matnr
                      and makt~spras = sy-langu.

endform.

************************************************************************
*  WRITE_REPORT
************************************************************************
form write_report.

  perform build_field_catalog.
  perform build_sort.

* CALL ABAP LIST VIEWER (ALV)
  call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
            it_sort     = sort
            it_fieldcat = fieldcat
       tables
            t_outtab    = imara.

endform.

************************************************************************
* BUILD_FIELD_CATALOG
************************************************************************
form build_field_catalog.

  data: fc_tmp type slis_t_fieldcat_alv with header line.
  clear: fieldcat. refresh: fieldcat.

  clear: fc_tmp.
  fc_tmp-reptext_ddic    = 'Material Number'.
  fc_tmp-fieldname  = 'MATNR'.
  fc_tmp-tabname   = 'IMARA'.
  fc_tmp-outputlen  = '18'.
  fc_tmp-col_pos    = 2.
  append fc_tmp to fieldcat.

  clear: fc_tmp.
  fc_tmp-reptext_ddic    = 'Sort Group'.
  fc_tmp-fieldname  = 'LABOR'.
  fc_tmp-tabname   = 'IMARA'.
  fc_tmp-outputlen  = '12'.
  fc_tmp-col_pos    = 3.
  append fc_tmp to fieldcat.


endform.

************************************************************************
*       FORM build_sort                                                *
************************************************************************
form build_sort.

  data: tmp_sort type line of slis_t_sortinfo_alv.

  clear sort. refresh sort.

  clear tmp_sort.
  tmp_sort-fieldname = 'MATNR'.
  tmp_sort-tabname   = 'IALV'.
  tmp_sort-up        = 'X'.
  append tmp_sort to sort.


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>Thu, 28 Jul 2005 15:06:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-list-display-problem/m-p/934941#M61747</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-07-28T15:06:47Z</dc:date>
    </item>
  </channel>
</rss>

