<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog/m-p/3136524#M745321</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;fieldcatalog is used to register your column to be display in ALV report and you can set the format for each column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;goto se11 -&amp;gt; type group = 'slis'&lt;/P&gt;&lt;P&gt;find = 'SLIS_T_FIELDCAT_ALV' -&amp;gt; attributes for field catalog as a format of each column&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field cataog is a table of type LVC_T_FCAT that contains information on the fields to be displayed. Thru this we can change the properties and can set new one...like Hotspot edit and all the things...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; when we display alv,&lt;/P&gt;&lt;P&gt;a) column headings&lt;/P&gt;&lt;P&gt;b) each column widths,&lt;/P&gt;&lt;P&gt;c) blue color for key field&lt;/P&gt;&lt;P&gt;d) format of display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field Catalog is a way to seperate presentation and logic. We pass the data to ALV with the help of a itab but to display and format the data Field Catalog is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the report BCALV_FIELDCAT_TEST to explore various options in field catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Define fieldcatalog like this&lt;/P&gt;&lt;P&gt;fieldcattab TYPE slis_t_fieldcat_alv WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can fill ur fieldcatalog like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR fieldcattab.&lt;/P&gt;&lt;P&gt;fieldcattab-col_pos = 1.&lt;/P&gt;&lt;P&gt;fieldcattab-fieldname = 'ZEILE'.&lt;/P&gt;&lt;P&gt;fieldcattab-tabname = 'T_MSEG'.&lt;/P&gt;&lt;P&gt;fieldcattab-fix_column = 'X'.&lt;/P&gt;&lt;P&gt;fieldcattab-seltext_l = 'Item'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now pass ur field catalog in Function module&lt;/P&gt;&lt;P&gt;REUSE_ALV_LIST_DISPLAY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample code:&lt;/P&gt;&lt;P&gt;If u have defined it in a table u can creaet teh fied catalog directly as belwo:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/alv/alv_variousfcat.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/alv/alv_variousfcat.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*For Function module ALV (report)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA: it_fieldcat  TYPE slis_t_fieldcat_alv,&lt;/P&gt;&lt;P&gt;        wa_fieldcat   LIKE LINE OF it_fieldcat.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_structure_name       = 'MARA'&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      ct_fieldcat            = it_fieldcat&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      inconsistent_interface = 1&lt;/P&gt;&lt;P&gt;      program_error          = 2&lt;/P&gt;&lt;P&gt;      OTHERS                 = 3.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;In case if u want SUM for a certain field alone, U have to change the fieldcatalog accordingly. See the below example, i would like to disaply only he below two fields from the MARA table, in tahtc ase code as below.&lt;/P&gt;&lt;P&gt;So there s no need to specify all the 180 fields only the relevant fields u can chage.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;FORM f9300_modify_field_cat TABLES p_fieldcat STRUCTURE lvc_s_fcat.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS: &amp;lt;lfs_fieldcat&amp;gt; TYPE lvc_s_fcat.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  LOOP AT p_fieldcat ASSIGNING &amp;lt;lfs_fieldcat&amp;gt;.&lt;/P&gt;&lt;P&gt;    CASE &amp;lt;lfs_fieldcat&amp;gt;-fieldname.&lt;/P&gt;&lt;P&gt;      WHEN 'MATNR'.&lt;/P&gt;&lt;P&gt;        &amp;lt;lfs_fieldcat&amp;gt;-hotspot  = 'X'.&lt;/P&gt;&lt;P&gt;        &amp;lt;lfs_fieldcat&amp;gt;-key      = 'X'.&lt;/P&gt;&lt;P&gt;      WHEN 'NTGEW'.&lt;/P&gt;&lt;P&gt;        &amp;lt;lfs_fieldcat&amp;gt;-do_sum      = 'X'.&lt;/P&gt;&lt;P&gt;      WHEN OTHERS.&lt;/P&gt;&lt;P&gt;       &amp;lt;lfs_fieldcat&amp;gt;-no_out     = 'X'.&lt;/P&gt;&lt;P&gt;    ENDCASE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds&lt;/P&gt;&lt;P&gt;Sivaparvathi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward points if its useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Dec 2007 14:08:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-12T14:08:29Z</dc:date>
    <item>
      <title>fieldcatalog</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog/m-p/3136522#M745319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sir.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anybody tell me indetail about fieldcatalog in ALV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2007 13:59:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog/m-p/3136522#M745319</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-12T13:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: fieldcatalog</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog/m-p/3136523#M745320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. when we display alv,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. a) column headings&lt;/P&gt;&lt;P&gt;b) each column widths,&lt;/P&gt;&lt;P&gt;c) blue color for key field&lt;/P&gt;&lt;P&gt;d) format of display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. All such information,&lt;/P&gt;&lt;P&gt;we have to provide.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. This information is contained&lt;/P&gt;&lt;P&gt;in an internal table (called field catalogue)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. This information is&lt;/P&gt;&lt;P&gt;gather from the fields of the internal table&lt;/P&gt;&lt;P&gt;and using data-dictionary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2007 14:02:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog/m-p/3136523#M745320</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-12T14:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: fieldcatalog</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog/m-p/3136524#M745321</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;fieldcatalog is used to register your column to be display in ALV report and you can set the format for each column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;goto se11 -&amp;gt; type group = 'slis'&lt;/P&gt;&lt;P&gt;find = 'SLIS_T_FIELDCAT_ALV' -&amp;gt; attributes for field catalog as a format of each column&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field cataog is a table of type LVC_T_FCAT that contains information on the fields to be displayed. Thru this we can change the properties and can set new one...like Hotspot edit and all the things...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; when we display alv,&lt;/P&gt;&lt;P&gt;a) column headings&lt;/P&gt;&lt;P&gt;b) each column widths,&lt;/P&gt;&lt;P&gt;c) blue color for key field&lt;/P&gt;&lt;P&gt;d) format of display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field Catalog is a way to seperate presentation and logic. We pass the data to ALV with the help of a itab but to display and format the data Field Catalog is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the report BCALV_FIELDCAT_TEST to explore various options in field catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Define fieldcatalog like this&lt;/P&gt;&lt;P&gt;fieldcattab TYPE slis_t_fieldcat_alv WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can fill ur fieldcatalog like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR fieldcattab.&lt;/P&gt;&lt;P&gt;fieldcattab-col_pos = 1.&lt;/P&gt;&lt;P&gt;fieldcattab-fieldname = 'ZEILE'.&lt;/P&gt;&lt;P&gt;fieldcattab-tabname = 'T_MSEG'.&lt;/P&gt;&lt;P&gt;fieldcattab-fix_column = 'X'.&lt;/P&gt;&lt;P&gt;fieldcattab-seltext_l = 'Item'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now pass ur field catalog in Function module&lt;/P&gt;&lt;P&gt;REUSE_ALV_LIST_DISPLAY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample code:&lt;/P&gt;&lt;P&gt;If u have defined it in a table u can creaet teh fied catalog directly as belwo:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/alv/alv_variousfcat.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/alv/alv_variousfcat.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*For Function module ALV (report)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA: it_fieldcat  TYPE slis_t_fieldcat_alv,&lt;/P&gt;&lt;P&gt;        wa_fieldcat   LIKE LINE OF it_fieldcat.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_structure_name       = 'MARA'&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      ct_fieldcat            = it_fieldcat&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      inconsistent_interface = 1&lt;/P&gt;&lt;P&gt;      program_error          = 2&lt;/P&gt;&lt;P&gt;      OTHERS                 = 3.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;In case if u want SUM for a certain field alone, U have to change the fieldcatalog accordingly. See the below example, i would like to disaply only he below two fields from the MARA table, in tahtc ase code as below.&lt;/P&gt;&lt;P&gt;So there s no need to specify all the 180 fields only the relevant fields u can chage.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;FORM f9300_modify_field_cat TABLES p_fieldcat STRUCTURE lvc_s_fcat.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS: &amp;lt;lfs_fieldcat&amp;gt; TYPE lvc_s_fcat.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  LOOP AT p_fieldcat ASSIGNING &amp;lt;lfs_fieldcat&amp;gt;.&lt;/P&gt;&lt;P&gt;    CASE &amp;lt;lfs_fieldcat&amp;gt;-fieldname.&lt;/P&gt;&lt;P&gt;      WHEN 'MATNR'.&lt;/P&gt;&lt;P&gt;        &amp;lt;lfs_fieldcat&amp;gt;-hotspot  = 'X'.&lt;/P&gt;&lt;P&gt;        &amp;lt;lfs_fieldcat&amp;gt;-key      = 'X'.&lt;/P&gt;&lt;P&gt;      WHEN 'NTGEW'.&lt;/P&gt;&lt;P&gt;        &amp;lt;lfs_fieldcat&amp;gt;-do_sum      = 'X'.&lt;/P&gt;&lt;P&gt;      WHEN OTHERS.&lt;/P&gt;&lt;P&gt;       &amp;lt;lfs_fieldcat&amp;gt;-no_out     = 'X'.&lt;/P&gt;&lt;P&gt;    ENDCASE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds&lt;/P&gt;&lt;P&gt;Sivaparvathi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward points if its useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2007 14:08:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fieldcatalog/m-p/3136524#M745321</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-12T14:08:29Z</dc:date>
    </item>
  </channel>
</rss>

