<?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 regarding preparing field catalog in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-preparing-field-catalog/m-p/1976339#M399915</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;&lt;/P&gt;&lt;P&gt;how can we populate a field catalog using REUSE_ALV_FIELDCATALOG_MERGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards.&lt;/P&gt;&lt;P&gt;bharath.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Feb 2007 17:17:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-15T17:17:17Z</dc:date>
    <item>
      <title>regarding preparing field catalog</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-preparing-field-catalog/m-p/1976339#M399915</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;&lt;/P&gt;&lt;P&gt;how can we populate a field catalog using REUSE_ALV_FIELDCATALOG_MERGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards.&lt;/P&gt;&lt;P&gt;bharath.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 17:17:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-preparing-field-catalog/m-p/1976339#M399915</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T17:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: regarding preparing field catalog</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-preparing-field-catalog/m-p/1976340#M399916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are examples all over the place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/fu015.htm" target="test_blank"&gt;http://www.sap-img.com/fu015.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/reincarnation-of-reuse-alv-fieldcatalog-merge.htm" target="test_blank"&gt;http://www.sap-img.com/abap/reincarnation-of-reuse-alv-fieldcatalog-merge.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.erpgenie.com/abap/code/abap28.htm" target="test_blank"&gt;http://www.erpgenie.com/abap/code/abap28.htm&lt;/A&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;Here are just a few.....&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, 15 Feb 2007 17:29:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-preparing-field-catalog/m-p/1976340#M399916</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-02-15T17:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: regarding preparing field catalog</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-preparing-field-catalog/m-p/1976341#M399917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Data to be displayed in ALV&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Using the following syntax, REUSE_ALV_FIELDCATALOG_MERGE can auto-&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;matically determine the fieldstructure from this source program&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;begin of imat occurs 100,&lt;/P&gt;&lt;P&gt;matnr like marav-matnr, "Material number&lt;/P&gt;&lt;P&gt;maktx like marav-maktx, "Material short text&lt;/P&gt;&lt;P&gt;matkl like marav-matkl, "Material group (so you can test to make&lt;/P&gt;&lt;P&gt;                        " intermediate sums)&lt;/P&gt;&lt;P&gt;ntgew like marav-ntgew, "Net weight, numeric field (so you can test to&lt;/P&gt;&lt;P&gt;                        "make sums)&lt;/P&gt;&lt;P&gt;gewei like marav-gewei, "weight unit (just to be complete)&lt;/P&gt;&lt;P&gt;end of imat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Other data needed&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;field to store report name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data i_repid like sy-repid.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;field to check table length&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data i_lines like sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Data for ALV display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TYPE-POOLS: SLIS.&lt;/P&gt;&lt;P&gt;data int_fcat type SLIS_T_FIELDCAT_ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options:&lt;/P&gt;&lt;P&gt;s_matnr for marav-matnr matchcode object MAT1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;read data into table imat&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  select * from marav&lt;/P&gt;&lt;P&gt;  into corresponding fields of table imat&lt;/P&gt;&lt;P&gt;  where&lt;/P&gt;&lt;P&gt;  matnr in s_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check if material was found&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  clear i_lines.&lt;/P&gt;&lt;P&gt;  describe table imat lines i_lines.&lt;/P&gt;&lt;P&gt;  if i_lines lt 1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Using hardcoded write here for easy upload&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    write: /&lt;/P&gt;&lt;P&gt;    'No materials found.'.&lt;/P&gt;&lt;P&gt;    exit.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end-of-selection.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Now, we start with ALV&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To use ALV, we need a DDIC-structure or a thing called Fieldcatalogue.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The fieldcatalouge can be generated by FUNCTION&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;'REUSE_ALV_FIELDCATALOG_MERGE' from an internal table from any&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;report source, including this report.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The only problem one might have is that the report and table names&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;need to be in capital letters. (I had it &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt; )&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Store report name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  i_repid = sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create Fieldcatalogue from internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            I_PROGRAM_NAME         = i_repid&lt;/P&gt;&lt;P&gt;            I_INTERNAL_TABNAME     = 'IMAT'  "capital letters!&lt;/P&gt;&lt;P&gt;            I_INCLNAME             = i_repid&lt;/P&gt;&lt;P&gt;       CHANGING&lt;/P&gt;&lt;P&gt;            CT_FIELDCAT            = int_fcat&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;*explanations:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_PROGRAM_NAME is the program which calls this function&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_INTERNAL_TABNAME is the name of the internal table which you want&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                      to display in ALV&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_INCLNAME is the ABAP-source where the internal table is defined&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;              (DATA....)&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     CT_FIELDCAT contains the Fieldcatalouge that we need later for&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     ALV display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    write: /&lt;/P&gt;&lt;P&gt;    'Returncode',&lt;/P&gt;&lt;P&gt;    sy-subrc,&lt;/P&gt;&lt;P&gt;    'from FUNCTION REUSE_ALV_FIELDCATALOG_MERGE'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*This was the fieldcatlogue&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;And now, we are ready to display our list&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call for ALV list display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           I_CALLBACK_PROGRAM = 'Z_ALV_SIMPLE_EXAMPLE_WITH_ITAB'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            I_CALLBACK_PROGRAM = i_repid&lt;/P&gt;&lt;P&gt;            IT_FIELDCAT        = int_fcat&lt;/P&gt;&lt;P&gt;            I_SAVE             = 'A'&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            T_OUTTAB           = imat&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            PROGRAM_ERROR      = 1&lt;/P&gt;&lt;P&gt;            OTHERS             = 2.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*explanations:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_CALLBACK_PROGRAM is the program which calls this function&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IT_FIELDCAT (just made by REUSE_ALV_FIELDCATALOG_MERGE) contains&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                now the data definition needed for display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_SAVE allows the user to save his own layouts&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     T_OUTTAB contains the data to be displayed in ALV&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    write: /&lt;/P&gt;&lt;P&gt;    'Returncode',&lt;/P&gt;&lt;P&gt;    sy-subrc,&lt;/P&gt;&lt;P&gt;    'from FUNCTION REUSE_ALV_LIST_DISPLAY'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 18:27:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-preparing-field-catalog/m-p/1976341#M399917</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T18:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: regarding preparing field catalog</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-preparing-field-catalog/m-p/1976342#M399918</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;u can add fields to fieldcatalog manually...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;**************************&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF gt_final_outtab OCCURS 0,&lt;/P&gt;&lt;P&gt;matnr LIKE mara-matnr,&lt;/P&gt;&lt;P&gt;mtart like mara-mtart,&lt;/P&gt;&lt;P&gt;maktx LIKE makt-maktx,&lt;/P&gt;&lt;P&gt;menge LIKE mseg-menge,&lt;/P&gt;&lt;P&gt;meins LIKE mseg-meins,&lt;/P&gt;&lt;P&gt;per_val TYPE p DECIMALS 4,&lt;/P&gt;&lt;P&gt;werks like mseg-werks,&lt;/P&gt;&lt;P&gt;END OF gt_final_outtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM get_fieldcat.&lt;/P&gt;&lt;P&gt;DATA: ls_fieldcat TYPE slis_fieldcat_alv.&lt;/P&gt;&lt;P&gt;DATA: pos TYPE i VALUE 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR ls_fieldcat.&lt;/P&gt;&lt;P&gt;ls_fieldcat-col_pos = pos.&lt;/P&gt;&lt;P&gt;ls_fieldcat-fieldname = 'MATNR'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-datatype = 'CHAR'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-outputlen = 18.&lt;/P&gt;&lt;P&gt;ls_fieldcat-seltext_l = 'Material Number'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-checkbox = 'X'.&lt;/P&gt;&lt;P&gt;APPEND ls_fieldcat TO gt_fieldcat.&lt;/P&gt;&lt;P&gt;CLEAR ls_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pos = pos + 1.&lt;/P&gt;&lt;P&gt;CLEAR ls_fieldcat.&lt;/P&gt;&lt;P&gt;ls_fieldcat-col_pos = pos.&lt;/P&gt;&lt;P&gt;ls_fieldcat-fieldname = 'MAKTX'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-datatype = 'CHAR'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-outputlen = 20.&lt;/P&gt;&lt;P&gt;ls_fieldcat-seltext_l = 'Product Description'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-checkbox = 'X'.&lt;/P&gt;&lt;P&gt;APPEND ls_fieldcat TO gt_fieldcat.&lt;/P&gt;&lt;P&gt;CLEAR ls_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pos = pos + 1.&lt;/P&gt;&lt;P&gt;CLEAR ls_fieldcat.&lt;/P&gt;&lt;P&gt;ls_fieldcat-col_pos = pos.&lt;/P&gt;&lt;P&gt;ls_fieldcat-fieldname = 'MENGE'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-outputlen = 15.&lt;/P&gt;&lt;P&gt;ls_fieldcat-seltext_l = 'Lbs Shipped'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-checkbox = 'X'.&lt;/P&gt;&lt;P&gt;APPEND ls_fieldcat TO gt_fieldcat.&lt;/P&gt;&lt;P&gt;CLEAR ls_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pos = pos + 1.&lt;/P&gt;&lt;P&gt;CLEAR ls_fieldcat.&lt;/P&gt;&lt;P&gt;ls_fieldcat-col_pos = pos.&lt;/P&gt;&lt;P&gt;ls_fieldcat-fieldname = 'MEINS'.&lt;/P&gt;&lt;P&gt;ls_fieldcat-outputlen = 4.&lt;/P&gt;&lt;P&gt;ls_fieldcat-seltext_l = 'QTY'.&lt;/P&gt;&lt;P&gt;APPEND ls_fieldcat TO gt_fieldcat.&lt;/P&gt;&lt;P&gt;CLEAR ls_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " get_fieldcat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM show_report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM get_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_callback_program = w_repid&lt;/P&gt;&lt;P&gt;it_fieldcat = gt_fieldcat[]&lt;/P&gt;&lt;P&gt;i_save = 'A'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;t_outtab = gt_final_outtab.&lt;/P&gt;&lt;P&gt;ENDFORM. " Show_report&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;SAB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 19:12:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-preparing-field-catalog/m-p/1976342#M399918</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T19:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: regarding preparing field catalog</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-preparing-field-catalog/m-p/1976343#M399919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Please note that structure ZSTOCK is a custom table and iline looks as follow :- &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: iline type table of zstock with header line. 
data: gt_fieldcat         type slis_t_fieldcat_alv. 

  perform setup-fieldcatalog using gt_fieldcat[]. 

form setup-fieldcatalog using _fieldcat type slis_t_fieldcat_alv. 
  data: ls_fieldcat type slis_fieldcat_alv. 

  call function 'REUSE_ALV_FIELDCATALOG_MERGE' 
       exporting 
            i_internal_tabname = 'ILINE' 
            i_structure_name   = 'ZSTOCK' 
       changing 
            ct_fieldcat        = _fieldcat. 

  loop at _fieldcat into ls_fieldcat. 
    case ls_fieldcat-fieldname. 
      when 'DEPT'. 
        ls_fieldcat-no_out    = 'X'. 
       when 'DESCR'. 
        ls_fieldcat-no_out    = 'X'. 
      when 'GOOD_PRD'. 
        ls_fieldcat-do_sum    = 'X'. 
    endcase. 

    modify _fieldcat from ls_fieldcat. 
  endloop. 

endform.                    " FIELDCATALOG&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the below link for an example program, it is well explained&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.erpgenie.com/abap/code/abap28.htm" target="test_blank"&gt;http://www.erpgenie.com/abap/code/abap28.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 19:17:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-preparing-field-catalog/m-p/1976343#M399919</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T19:17:13Z</dc:date>
    </item>
  </channel>
</rss>

