<?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. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3300789#M790154</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;what is the uses of 'reuse_alv_field_catalog_merge' and 'slis_t_fieldcatalog_alv'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Jan 2008 10:33:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-25T10:33:19Z</dc:date>
    <item>
      <title>ALV.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3300789#M790154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;what is the uses of 'reuse_alv_field_catalog_merge' and 'slis_t_fieldcatalog_alv'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2008 10:33:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3300789#M790154</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-25T10:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: ALV.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3300790#M790155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;What is fieldcatalog in ALV?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field catalog containing descriptions of the list output fields. You can use fields of the catalog to determine the number format and column properties of the list to be displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field catalog contains more than 60 fields, some of which are only used internally. The field catalog is defined in the Data Dictionary through table type LVC_T_FCAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can get field description by calling function module REUSE_ALV_FIELDCATALOG_MERGE. You can see the sample in my post about Simple ALV Report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general case, we only use few field to describe output field.&lt;/P&gt;&lt;P&gt;To make it easier I use this form:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f_alv_fieldcatg USING&lt;/P&gt;&lt;P&gt;fu_types "internal table name&lt;/P&gt;&lt;P&gt;fu_fname "Field name of internal table field&lt;/P&gt;&lt;P&gt;fu_reftb "reference table name&lt;/P&gt;&lt;P&gt;fu_refld "reference table field&lt;/P&gt;&lt;P&gt;fu_noout "X= No out&lt;/P&gt;&lt;P&gt;fu_outln "out&lt;/P&gt;&lt;P&gt;fu_fltxt "output length&lt;/P&gt;&lt;P&gt;fu_dosum "X=Do sum (total)&lt;/P&gt;&lt;P&gt;fu_hotsp "X=hotspot on&lt;/P&gt;&lt;P&gt;fu_just. "Justification:L,R,C&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: t_fieldcat.&lt;/P&gt;&lt;P&gt;t_fieldcat-tabname = fu_types.&lt;/P&gt;&lt;P&gt;t_fieldcat-fieldname = fu_fname.&lt;/P&gt;&lt;P&gt;t_fieldcat-ref_tabname = fu_reftb.&lt;/P&gt;&lt;P&gt;t_fieldcat-ref_fieldname = fu_refld.&lt;/P&gt;&lt;P&gt;t_fieldcat-no_out = fu_noout.&lt;/P&gt;&lt;P&gt;t_fieldcat-outputlen = fu_outln.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_l = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_m = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_s = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-reptext_ddic = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-no_out = fu_noout.&lt;/P&gt;&lt;P&gt;t_fieldcat-do_sum = fu_dosum.&lt;/P&gt;&lt;P&gt;t_fieldcat-hotspot = fu_hotsp.&lt;/P&gt;&lt;P&gt;t_fieldcat-just = fu_just.&lt;/P&gt;&lt;P&gt;APPEND t_fieldcat.&lt;/P&gt;&lt;P&gt;CLEAR t_fieldcat.&lt;/P&gt;&lt;P&gt;ENDFORM. " f_alv_fieldcatg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can use it in two way:&lt;/P&gt;&lt;P&gt;1. refer to data dictionary:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM f_alv_fieldcatg USING 'T_REPORT' :&lt;/P&gt;&lt;P&gt;'EQUNR' 'EQUI' 'EQUNR' '' '' '' '' 'X' '',&lt;/P&gt;&lt;P&gt;'SPART' 'VBAK' 'SPART' '' '' '' '' '' ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. or define yourself&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM f_alv_fieldcatg USING 'T_REPORT' :&lt;/P&gt;&lt;P&gt;'FIELD1' '' '' '' '20' 'Text Field1' '' '' ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and for field with type number, I use this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form f_alv_fieldcatg_number&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&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;text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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 f_alv_fieldcatg_number USING fu_types&lt;/P&gt;&lt;P&gt;fu_fname&lt;/P&gt;&lt;P&gt;fu_noout&lt;/P&gt;&lt;P&gt;fu_outln&lt;/P&gt;&lt;P&gt;fu_no_sign&lt;/P&gt;&lt;P&gt;fu_no_zero&lt;/P&gt;&lt;P&gt;fu_fltxt&lt;/P&gt;&lt;P&gt;fu_dosum&lt;/P&gt;&lt;P&gt;fu_exponent&lt;/P&gt;&lt;P&gt;fu_decimals_out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: t_fieldcat.&lt;/P&gt;&lt;P&gt;t_fieldcat-tabname = fu_types.&lt;/P&gt;&lt;P&gt;t_fieldcat-fieldname = fu_fname.&lt;/P&gt;&lt;P&gt;t_fieldcat-no_out = fu_noout.&lt;/P&gt;&lt;P&gt;t_fieldcat-outputlen = fu_outln.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_l = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_m = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_s = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-reptext_ddic = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-no_zero = fu_no_zero.&lt;/P&gt;&lt;P&gt;t_fieldcat-no_sign = fu_no_sign.&lt;/P&gt;&lt;P&gt;t_fieldcat-exponent = fu_exponent.&lt;/P&gt;&lt;P&gt;t_fieldcat-decimals_out = fu_decimals_out.&lt;/P&gt;&lt;P&gt;t_fieldcat-do_sum = fu_dosum.&lt;/P&gt;&lt;P&gt;t_fieldcat-datatype = 'FLTP'.&lt;/P&gt;&lt;P&gt;APPEND t_fieldcat.&lt;/P&gt;&lt;P&gt;CLEAR t_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " f_alv_fieldcatg_number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For field currency, there are two options, fixed currency or variable currency.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form f_alv_fieldcatg_curr&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&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;text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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 f_alv_fieldcatg_curr USING fu_types&lt;/P&gt;&lt;P&gt;fu_fname&lt;/P&gt;&lt;P&gt;fu_reftb&lt;/P&gt;&lt;P&gt;fu_refld&lt;/P&gt;&lt;P&gt;fu_noout&lt;/P&gt;&lt;P&gt;fu_outln&lt;/P&gt;&lt;P&gt;fu_fltxt&lt;/P&gt;&lt;P&gt;fu_dosum&lt;/P&gt;&lt;P&gt;fu_hotsp&lt;/P&gt;&lt;P&gt;fu_cfield.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: t_fieldcat.&lt;/P&gt;&lt;P&gt;t_fieldcat-tabname = fu_types.&lt;/P&gt;&lt;P&gt;t_fieldcat-fieldname = fu_fname.&lt;/P&gt;&lt;P&gt;t_fieldcat-ref_tabname = fu_reftb.&lt;/P&gt;&lt;P&gt;t_fieldcat-ref_fieldname = fu_refld.&lt;/P&gt;&lt;P&gt;t_fieldcat-no_out = fu_noout.&lt;/P&gt;&lt;P&gt;t_fieldcat-outputlen = fu_outln.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_l = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_m = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_s = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-reptext_ddic = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-do_sum = fu_dosum.&lt;/P&gt;&lt;P&gt;t_fieldcat-hotspot = fu_hotsp.&lt;/P&gt;&lt;P&gt;t_fieldcat-cfieldname = fu_cfield.&lt;/P&gt;&lt;P&gt;t_fieldcat-ctabname = fu_types.&lt;/P&gt;&lt;P&gt;t_fieldcat-no_zero = 'X'.&lt;/P&gt;&lt;P&gt;APPEND t_fieldcat.&lt;/P&gt;&lt;P&gt;CLEAR t_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " F_FIELDCATG_CURR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;amp; Form f_alv_fieldcatg_curr&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&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;text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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 f_alv_fieldcatg_curr_fixed USING fu_types&lt;/P&gt;&lt;P&gt;fu_fname&lt;/P&gt;&lt;P&gt;fu_reftb&lt;/P&gt;&lt;P&gt;fu_refld&lt;/P&gt;&lt;P&gt;fu_noout&lt;/P&gt;&lt;P&gt;fu_outln&lt;/P&gt;&lt;P&gt;fu_fltxt&lt;/P&gt;&lt;P&gt;fu_dosum&lt;/P&gt;&lt;P&gt;fu_hotsp&lt;/P&gt;&lt;P&gt;fu_curr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: t_fieldcat.&lt;/P&gt;&lt;P&gt;t_fieldcat-tabname = fu_types.&lt;/P&gt;&lt;P&gt;t_fieldcat-fieldname = fu_fname.&lt;/P&gt;&lt;P&gt;t_fieldcat-ref_tabname = fu_reftb.&lt;/P&gt;&lt;P&gt;t_fieldcat-ref_fieldname = fu_refld.&lt;/P&gt;&lt;P&gt;t_fieldcat-no_out = fu_noout.&lt;/P&gt;&lt;P&gt;t_fieldcat-outputlen = fu_outln.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_l = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_m = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_s = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-reptext_ddic = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-do_sum = fu_dosum.&lt;/P&gt;&lt;P&gt;t_fieldcat-hotspot = fu_hotsp.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;t_fieldcat-cfieldname = fu_cfield.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;t_fieldcat-ctabname = fu_types.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;t_fieldcat-datatype = 'CURR'.&lt;/P&gt;&lt;P&gt;t_fieldcat-currency = fu_curr.&lt;/P&gt;&lt;P&gt;t_fieldcat-no_zero = 'X'.&lt;/P&gt;&lt;P&gt;APPEND t_fieldcat.&lt;/P&gt;&lt;P&gt;CLEAR t_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " F_FIELDCATG_CURR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2008 10:37:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3300790#M790155</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-25T10:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: ALV.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3300791#M790156</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;&lt;/P&gt;&lt;P&gt;Types of ALV displays:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Basically there are three types of displays in ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. List display.&lt;/P&gt;&lt;P&gt;2. Grid display.&lt;/P&gt;&lt;P&gt;3. Hierarchical display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Most of the applications involve List and grid displays .Hierarchical display is generally not used. Grid display has some additional features compared to list display therefore mostly used in applications.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I want to give a brief idea of how to do ALV programming with a simple example. This document also shows how to get the search help for the display variants and little basics of interactive ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STEPS INVOLVED IN ALV PROGRAMMING:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  The first step involved in ALV programming is the creation of the field catalogue.&lt;/P&gt;&lt;P&gt;This can be done in three ways.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.	Automatic building by using function module   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REUSE_ALV_FIELD_CATELOGE_MERGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.	Manual building.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.	Semi automatic building.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.	Automatic method: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  In this method we will call the function module&lt;/P&gt;&lt;P&gt; REUSE_ALV &lt;U&gt;FIELDCATELOGE&lt;/U&gt;MERGE to build the field catalogue.&lt;/P&gt;&lt;P&gt;                In this FM we will pass the program name under i_program_name, &lt;/P&gt;&lt;P&gt;output internal table from which data is to be displayed under the parameter i_internal_tabname, include filename if we have any includes under i_inclname, i_bypassing_buffer as &amp;#145;X&amp;#146;, i_buffer_active as space under the exporting parameters and an internal table declared as of Type slis_t_fieldcat_alv under the changing parameters. (Refer the code for details).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; After execution of this function module we will get the field catalogue in the internal table we had given under changing parameter ct_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.	Manual method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this method we will build the field catalogue by manually assigning the values to the internal table. The following example explains how to build manual field catalogue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR i_fieldcat.&lt;/P&gt;&lt;P&gt;  w_fieldcat-col_pos = 1.&lt;/P&gt;&lt;P&gt;  w_fieldcat-fieldname = 'EBELN'.&lt;/P&gt;&lt;P&gt;  w_fieldcat-reptext_ddic = 'Purchasing Document Number'.&lt;/P&gt;&lt;P&gt;  APPEND w_fieldcat TO i_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  w_fieldcat-col_pos = 2.&lt;/P&gt;&lt;P&gt;  w_fieldcat-fieldname = 'EKORG'.&lt;/P&gt;&lt;P&gt;  w_fieldcat-reptext_ddic = 'Purchasing Organization'.&lt;/P&gt;&lt;P&gt;  APPEND w_fieldcat TO i_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here we will specify each field of the field catalogue for each column and at the end of each column&amp;#146;s specification we will append these details to the internal table. Like this we have to specify for all the columns which we have to display in output. Here I have considered only three attributes to build the field catalogue, you can add some more attributes (Refer slis_t_fieldcat_alv).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.	Semiautomatic method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; In this method first we will build the field catalogue using the function module REUSE_ALV_FIELDCATELOGE_MERGE .After this we will manually build the field catalogue for the column positions which we want to change the details got from the function module REUSE_ALV_FIELDCATELOGE_MERGE.The values from the function module are over written by the manual field catalogue values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second step is calling the function module to display the output values. As we already discussed we have three types of displays. Depending on the application we will call the function module to display the output internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We pass the name of the structure to be the template and the function module generates a field catalog for us. After getting the generated field catalog, we loop at it and change whatever we want. The name of the function module is &amp;#147;LVC_FIELDCATALOG_MERGE&amp;#148;. Here is an example coding to illustrate semi-automatic field catalog generation procedure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FORM prepare_field_catalog CHANGING pt_fieldcat TYPE lvc_t_fcat .&lt;/P&gt;&lt;P&gt;DATA ls_fcat type lvc_s_fcat .&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_structure_name = 'SFLIGHT'&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;ct_fieldcat = pt_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;*--Exception handling&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;LOOP AT pt_fieldcat INTO ls_fcat .&lt;/P&gt;&lt;P&gt;CASE pt_fieldcat-fieldname .&lt;/P&gt;&lt;P&gt;WHEN 'CARRID' .&lt;/P&gt;&lt;P&gt;ls_fcat-outpulen = '10' .&lt;/P&gt;&lt;P&gt;ls_fcat-coltext = 'Airline Carrier ID' .&lt;/P&gt;&lt;P&gt;MODIFY pt_fieldcat FROM ls_fcat .&lt;/P&gt;&lt;P&gt;WHEN 'PAYMENTSUM' .&lt;/P&gt;&lt;P&gt;ls_fcat-no_out = 'X' .&lt;/P&gt;&lt;P&gt;MODIFY pt_fieldcat FROM ls_fcat .&lt;/P&gt;&lt;P&gt;ENDCASE .&lt;/P&gt;&lt;P&gt;ENDLOOP .&lt;/P&gt;&lt;P&gt;ENDFORM .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the sample code above, firstly a field catalog is generated. It is filled with respect to &amp;lt;structure_name&amp;gt; (e.g. &amp;#145;SFLIGHT&amp;#146;). After filling, we have changed the output length and column text for a column (here &amp;#145;CARRID&amp;#146;) and make another column (&amp;#145;PAYMENTSUM&amp;#146;) not to be displayed.&lt;/P&gt;&lt;P&gt;Now that, I can hear the question &amp;#147;What would happen if I both pass a structure name to the parameter &amp;#145;I_STRUCTURE_NAME&amp;#146; and a table to the parameter &amp;#145;IT_FIELDCATALOG&amp;#146;?&amp;#148;. Of course, the method gives a priority to one and it is the name of the structure passed to the parameter &amp;#145;I_STRUCTURE_NAME&amp;#146; which has the priority.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls reward points if helpful,&lt;/P&gt;&lt;P&gt;shylaja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Jan 2008 05:39:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3300791#M790156</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-26T05:39:02Z</dc:date>
    </item>
  </channel>
</rss>

