<?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: Fieldcatalog error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog-error/m-p/5073068#M1178522</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;Check these fields in the Fiedlcatalog...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    decimalsfieldname  &lt;/P&gt;&lt;P&gt;    decimalstabname  &lt;/P&gt;&lt;P&gt;    decimals_out&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Feb 2009 04:33:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-06T04:33:02Z</dc:date>
    <item>
      <title>Fieldcatalog error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog-error/m-p/5073067#M1178521</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;&lt;/P&gt;&lt;P&gt; i have a issue in the fieldcatalog of my ALV report. I have few packed decimal fields in my internal table for field1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;          f1 type p decimals 2,&lt;/P&gt;&lt;P&gt;          f2 type p decimals 2,&lt;/P&gt;&lt;P&gt;          f3 type p decimals 2,&lt;/P&gt;&lt;P&gt;          f4 type p decimals 2,&lt;/P&gt;&lt;P&gt;          f5 type i,&lt;/P&gt;&lt;P&gt;          ....&lt;/P&gt;&lt;P&gt;        end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the report was in ALV list. we converted that into ALV grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After converting the report to ALV  grid, the packed decimal fields [f1 to f4], if they have zeroes, they are shown as blank. Zeroes are not appearing on the report. In debug mode, i checked, and the itab has all the values. But when i execute, the zeroes are not showing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The report has used fieldcatalog merge function module, and after that they used a macro to edit the fieldcat properties of the fields. I also tried using fieldcat properties like lzero. no_zero etc, but they are of no use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i did was to remove the fieldcat merge function module and also the macro and manually assigned the properties to the fields of fieldcatalog and changed the declaration of f1,f2,f3,f4 fields from packed decimal to currency fields[Ex: f1 like mseg-dmbtr].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But still i do not get zeroes in the output. Any help will be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Can we display packed decimal fields with value zero in the ALV grid display??&lt;/STRONG&gt; is tehre any way to do this? i am using ECC 6.0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 04:01:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog-error/m-p/5073067#M1178521</guid>
      <dc:creator>rnb86</dc:creator>
      <dc:date>2009-02-06T04:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Fieldcatalog error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog-error/m-p/5073068#M1178522</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;Check these fields in the Fiedlcatalog...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    decimalsfieldname  &lt;/P&gt;&lt;P&gt;    decimalstabname  &lt;/P&gt;&lt;P&gt;    decimals_out&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 04:33:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog-error/m-p/5073068#M1178522</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T04:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: Fieldcatalog error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog-error/m-p/5073069#M1178523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Avinash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i tried your suggestion, but it is still not resolved. No_decimals is not correct. Do u know any other solutions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 09:13:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog-error/m-p/5073069#M1178523</guid>
      <dc:creator>rnb86</dc:creator>
      <dc:date>2009-02-06T09:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Fieldcatalog error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog-error/m-p/5073070#M1178524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;alv display can not show leading zeros or zeros in currency.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can move these to charcter field and then display. in this case zero will be considered as charatecter and then it will be displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this case u can not sum on amounts( since those are characters).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 09:55:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog-error/m-p/5073070#M1178524</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T09:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Fieldcatalog error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog-error/m-p/5073071#M1178525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi rnb,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i wrote a little test programm and the type p columns are displayed fine. in col 4 there ist 0,00.&lt;/P&gt;&lt;P&gt;I guess you should just use the packed numbers as such and don't convert them.&lt;/P&gt;&lt;P&gt;I hope this helps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  ZTEST001.

types: begin of gt_itab ,
f1 type p decimals 2,
f2 type p decimals 2,
f3 type p decimals 2,
f4 type p decimals 2,
f5 type i,
  end of gt_itab.
data: ok_code like sy-ucomm,

      itab type table of gt_itab,
      wa_itab like line of itab,

      it_fcat type table of lvc_s_fcat,
      wa_fcat type lvc_s_fcat,

  go_container type ref to cl_gui_custom_container,
  go_alv type ref to cl_gui_alv_grid.

do 5 times.
  wa_itab-f1 = sy-index * 5.
  wa_itab-f2 = wa_itab-f1 / 2.
  wa_itab-f3 = wa_itab-f1 / 3.
  wa_itab-f4 = 0.
  wa_itab-f5 = sy-index.
  append wa_itab to itab.
enddo.


  wa_fcat-fieldname = 'F1'.
  wa_fcat-inttype = 'P'.
  wa_fcat-outputlen = 10.
  wa_fcat-coltext = 'F1'.

  append wa_fcat to it_fcat.
  clear wa_fcat.
  wa_fcat-fieldname = 'F2'.
  wa_fcat-inttype = 'P'.
  wa_fcat-outputlen = 10.
  wa_fcat-coltext = 'F2'.

  append wa_fcat to it_fcat.
  clear wa_fcat.
  wa_fcat-fieldname = 'F3'.
  wa_fcat-inttype = 'P'.
  wa_fcat-outputlen = 10.
  wa_fcat-coltext = 'F3'.

  append wa_fcat to it_fcat.
  clear wa_fcat.
  wa_fcat-fieldname = 'F4'.
  wa_fcat-inttype = 'P'.
  wa_fcat-outputlen = 10.
  wa_fcat-coltext = 'F4'.

  append wa_fcat to it_fcat.
  clear wa_fcat.
  wa_fcat-fieldname = 'F5'.
  wa_fcat-inttype = 'I'.
  wa_fcat-outputlen = 3.
  wa_fcat-coltext = 'F5'.

  append wa_fcat to it_fcat.
  clear wa_fcat.




call screen 0100.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  STATUS_0100  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module STATUS_0100 output.
  SET PF-STATUS 'STAT0100'.
*  SET TITLEBAR 'xxx'.
CREATE OBJECT go_container
    EXPORTING
      container_name              = 'CONTAINER'.
  CREATE OBJECT go_alv
    EXPORTING
       i_parent          = go_container.
  go_alv-&amp;gt;set_table_for_first_display(
    CHANGING
      it_outtab                     = itab
      it_fieldcatalog               = it_fcat ).
endmodule.                 " STATUS_0100  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  USER_COMMAND_0100  INPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module USER_COMMAND_0100 input.
case ok_code.
  when 'EXIT'.
    leave program.
endcase.
endmodule.                 " USER_COMMAND_0100  INPUT
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 09:56:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog-error/m-p/5073071#M1178525</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T09:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Fieldcatalog error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog-error/m-p/5073072#M1178526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try transferring the data to character variable b4 passing it 2 Fcat.&lt;/P&gt;&lt;P&gt;It wont truncate zeros if they are in char field&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 09:57:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog-error/m-p/5073072#M1178526</guid>
      <dc:creator>agnihotro_sinha2</dc:creator>
      <dc:date>2009-02-06T09:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Fieldcatalog error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog-error/m-p/5073073#M1178527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;complete&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 07:06:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog-error/m-p/5073073#M1178527</guid>
      <dc:creator>rnb86</dc:creator>
      <dc:date>2009-10-28T07:06:57Z</dc:date>
    </item>
  </channel>
</rss>

