<?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: problem in adding columns to ALV display in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-adding-columns-to-alv-display/m-p/5997346#M1343635</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, you are using the FIELDCATALOG_MERGE to take the base fieldcatalog. Now you want to add some new fields. Add the information into the working area of the fieldcatalog and then append this into the fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually you are using the FM to download the fieldcatalog from the table structure. The fieldcatalog is a table without a header line, for this reason you are using the working area (LVC_S_FCAT). Add your new fields by appending the wa_fieldcat to fieldcat.&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;Wiht Regards&lt;/P&gt;&lt;P&gt;George&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Aug 2009 10:21:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-14T10:21:55Z</dc:date>
    <item>
      <title>problem in adding columns to ALV display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-adding-columns-to-alv-display/m-p/5997345#M1343634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Presently Iam using FM 'LVC_FIELDCATALOG_MERGE' to build field catelog by exporting Ztable.&lt;/P&gt;&lt;P&gt;Now I want to add 3 extra columns in ALV output from a different table(Internal table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code is as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_BUFFER_ACTIVE              =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   I_STRUCTURE_NAME             = 'ZFXXAPPERRPROC'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_CLIENT_NEVER_DISPLAY       = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_BYPASSING_BUFFER           =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_INTERNAL_TABNAME           =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;          .&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;Can u pls help me to achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Sravanthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 10:12:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-adding-columns-to-alv-display/m-p/5997345#M1343634</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T10:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: problem in adding columns to ALV display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-adding-columns-to-alv-display/m-p/5997346#M1343635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, you are using the FIELDCATALOG_MERGE to take the base fieldcatalog. Now you want to add some new fields. Add the information into the working area of the fieldcatalog and then append this into the fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually you are using the FM to download the fieldcatalog from the table structure. The fieldcatalog is a table without a header line, for this reason you are using the working area (LVC_S_FCAT). Add your new fields by appending the wa_fieldcat to fieldcat.&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;Wiht Regards&lt;/P&gt;&lt;P&gt;George&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 10:21:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-adding-columns-to-alv-display/m-p/5997346#M1343635</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T10:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: problem in adding columns to ALV display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-adding-columns-to-alv-display/m-p/5997347#M1343636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shravanthi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try to build a new internal table by combining the currently-used "pt_fieldcat" table and the 3 new columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, pass this larger internal table to the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Technically, it is not possible to pass two internal tables to this FM. Also, using the above method, you can merge the rows correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps! Do revert if you need anything else!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Shailesh&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Always provide feedback for helpful answers!&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 10:23:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-adding-columns-to-alv-display/m-p/5997347#M1343636</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T10:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: problem in adding columns to ALV display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-adding-columns-to-alv-display/m-p/5997348#M1343637</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;Using field catalog merge, first populate the internal table for field catalog. Then modify this table to add three new columns from your internal table. For that define a work area for the field catalog and populate it with required details and then append it to the internal table of field catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;L_FIELDCAT-COL_POS      = V_C_01.
  L_FIELDCAT-FIELDNAME    = V_C_TEXT.
  L_FIELDCAT-TABNAME      = L_C_TABNAME.
  L_FIELDCAT-SELTEXT_L    = TEXT-001.                    "TEXT
  L_FIELDCAT-KEY          = V_C_X.
  L_FIELDCAT-OUTPUTLEN    = L_C_OUT1.
  APPEND L_FIELDCAT TO FP_I_FIELDCAT.
  CLEAR L_FIELDCAT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sourav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 10:27:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-adding-columns-to-alv-display/m-p/5997348#M1343637</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T10:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: problem in adding columns to ALV display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-adding-columns-to-alv-display/m-p/5997349#M1343638</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;By using 'LVC_FIELDCATALOG_MERGE' we can build a fieldcatalog with particular one structure only. &lt;/P&gt;&lt;P&gt;If you want to add 3 more fields from internal table then add those field into your structure ( i.e ZFXXAPPERRPROC) otherwise build the fieldcatalog by appending individual fields (from structure ZFXXAPPERRPROC and 3 more fields from internal table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;  Rajani.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 10:28:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-adding-columns-to-alv-display/m-p/5997349#M1343638</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T10:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: problem in adding columns to ALV display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-adding-columns-to-alv-display/m-p/5997350#M1343639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  Anlternative Solution for your Dynamic fieldcat is:&lt;/P&gt;&lt;P&gt;Steps:&lt;/P&gt;&lt;P&gt;1. We have Structure / Table name&lt;/P&gt;&lt;P&gt;2. Get fields and its details from DD03L Table for the given table / Stucture.&lt;/P&gt;&lt;P&gt;3. Get Field Descriptions from DD04T table for all ROLLNAMES from the DD03L data. (Rollname is Dataelement)&lt;/P&gt;&lt;P&gt;4. Build field catalog from this data.&lt;/P&gt;&lt;P&gt;5. Add additional fields how many you want.&lt;/P&gt;&lt;P&gt;Note: In the given Table / Structure if we have Vurrency / Quantity fields, we need to pass ref field name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Balaji Peethani.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Peethani Balaji on Aug 14, 2009 6:05 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 16:04:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-adding-columns-to-alv-display/m-p/5997350#M1343639</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T16:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: problem in adding columns to ALV display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-adding-columns-to-alv-display/m-p/5997351#M1343640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sravanthi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Create a new structure ZFXXAPPERRPROC_ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Include ZFXXAPPERRPROC in the structure ZFXXAPPERRPROC_ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Add the 3 new fields to structure ZFXXAPPERRPROC_ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Pass structure ZFXXAPPERRPROC_ALV to the function module instead of table ZFXXAPPERRPROC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REFRESH pt_fieldcat.

CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
  EXPORTING
    i_structure_name = 'ZFXXAPPERRPROC_AVL'
  CHANGING
    ct_fieldcat      = pt_fieldcat
  EXCEPTIONS
    OTHERS           = 0.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 17:05:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-adding-columns-to-alv-display/m-p/5997351#M1343640</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T17:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: problem in adding columns to ALV display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-adding-columns-to-alv-display/m-p/5997352#M1343641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sravanthi,&lt;/P&gt;&lt;P&gt;after using LVC field cat merge, your field catalog is generated.&lt;/P&gt;&lt;P&gt;its a like a normal internal table.. right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so just add the rest of the three fields to it with append statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this solves yours problem...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 17:14:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-adding-columns-to-alv-display/m-p/5997352#M1343641</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T17:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: problem in adding columns to ALV display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-adding-columns-to-alv-display/m-p/5997353#M1343642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sravanthi Palepu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to display more columns, you need:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- a new internal table with more columns&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- the columns in the field catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first task is much more complec then the last:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may re-create the internal table using runtime dynamic type services but you may run into trouble as soon as any column is not based on a data dictionary domain, i.e. direct type entry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It may be much easier to create a copy of the existing dictionary structure. Add the new fields here. Use it to define the internal table to display and the fieldcatalog as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2009 19:43:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-adding-columns-to-alv-display/m-p/5997353#M1343642</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2009-08-15T19:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: problem in adding columns to ALV display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-adding-columns-to-alv-display/m-p/5997354#M1343643</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;you should hide/show the column you want to add.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;declare your column in your node, hide it at first, and then when the user clicks on the button 'add' show it. you have to manage this in your modifyView method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Saurabh Goel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2009 05:08:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-adding-columns-to-alv-display/m-p/5997354#M1343643</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-17T05:08:27Z</dc:date>
    </item>
  </channel>
</rss>

