<?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: ALV adding a new column in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-adding-a-new-column/m-p/1503099#M232744</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi baran ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are alternative ways if you're creating it for use in list viewer you don't have to use methods.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;use this for merging fields that you use in your &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;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        = sy-repid&lt;/P&gt;&lt;P&gt;      i_internal_tabname     = 'WT_LIST'&lt;/P&gt;&lt;P&gt;      i_client_never_display = 'X'&lt;/P&gt;&lt;P&gt;    i_inclname        =    gc_include_name&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      ct_fieldcat            = wt_fcat2&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;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------" /&gt;*&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to append directly or after the fieldcatalog merge&lt;/P&gt;&lt;P&gt;such as : &lt;/P&gt;&lt;P&gt;     CLEAR ws_fcat.&lt;/P&gt;&lt;P&gt;    ws_fcat-fieldname = 'BANKN'.&lt;/P&gt;&lt;P&gt;    ws_fcat-tabname   = 'WT_VENDOR'.&lt;/P&gt;&lt;P&gt;    ws_fcat-ref_fieldname = 'BANKN'.&lt;/P&gt;&lt;P&gt;    ws_fcat-ref_tabname   = 'LFBK'.&lt;/P&gt;&lt;P&gt;    ws_fcat-input         = wv_edit.&lt;/P&gt;&lt;P&gt;    APPEND ws_fcat TO wt_fcat.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------------" /&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Aug 2006 12:38:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-18T12:38:57Z</dc:date>
    <item>
      <title>ALV adding a new column</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-adding-a-new-column/m-p/1503094#M232739</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;In ALV, how do you create columns and add them so that they are displayed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have a list viewer and we want to add a new column to it.&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;Baran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2006 12:11:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-adding-a-new-column/m-p/1503094#M232739</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-18T12:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: ALV adding a new column</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-adding-a-new-column/m-p/1503095#M232740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Baran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Add that new field in the fieldcatalog and populate the value in the value in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at it_fieldcatalog into wa_fieldcatalog.

 wa_fieldcatalog-fieldname = 'NEW_FIELD'.
 wa_fieldcatalog-outputlen = '15'.
 append wa_fieldcatalog to it_fieldcatalog.
 clear wa_fieldcatalog,
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2006 12:14:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-adding-a-new-column/m-p/1503095#M232740</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-18T12:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: ALV adding a new column</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-adding-a-new-column/m-p/1503096#M232741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for the reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do you know which method contains the fieldcatalog?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2006 12:16:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-adding-a-new-column/m-p/1503096#M232741</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-18T12:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: ALV adding a new column</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-adding-a-new-column/m-p/1503097#M232742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is not a method , may be u can show ur code&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2006 12:19:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-adding-a-new-column/m-p/1503097#M232742</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-18T12:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: ALV adding a new column</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-adding-a-new-column/m-p/1503098#M232743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Baran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Populate the fieldcatalog seperately like this...&lt;/P&gt;&lt;P&gt;data: WA_FLDCAT_SUMMARY TYPE LVC_S_FCAT,&lt;/P&gt;&lt;P&gt;IT_FLDCAT_SUMMARY TYPE LVC_T_FCAT.&lt;/P&gt;&lt;P&gt;*--populating the fieldcatalog used for displaying summary details&lt;/P&gt;&lt;P&gt;    WA_FLDCAT_SUMMARY-FIELDNAME   = 'MBDAT'.&lt;/P&gt;&lt;P&gt;    WA_FLDCAT_SUMMARY-TABNAME     = 'IT_SUMMARY'.&lt;/P&gt;&lt;P&gt;    WA_FLDCAT_SUMMARY-REPTEXT =  TEXT-002.&lt;/P&gt;&lt;P&gt;    WA_FLDCAT_SUMMARY-COL_POS = '1'.&lt;/P&gt;&lt;P&gt;    WA_FLDCAT_SUMMARY-OUTPUTLEN  = 20.&lt;/P&gt;&lt;P&gt;    WA_FLDCAT_SUMMARY-KEY  = 'X'.&lt;/P&gt;&lt;P&gt;    APPEND WA_FLDCAT_SUMMARY TO IT_FLDCAT_SUMMARY.&lt;/P&gt;&lt;P&gt;    CLEAR WA_FLDCAT_SUMMARY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now asusal pass this in the method.&lt;/P&gt;&lt;P&gt;*--displaying the summary details&lt;/P&gt;&lt;P&gt;    SORT IT_SUMMARY BY MBDAT.&lt;/P&gt;&lt;P&gt;    CALL METHOD OBJ_GRID_SUMMARY-&amp;gt;SET_TABLE_FOR_FIRST_DISPLAY&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        IS_LAYOUT       = X_SUMMARY&lt;/P&gt;&lt;P&gt;      CHANGING&lt;/P&gt;&lt;P&gt;        IT_FIELDCATALOG = IT_FLDCAT_SUMMARY&lt;/P&gt;&lt;P&gt;        IT_OUTTAB       = IT_SUMMARY[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2006 12:29:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-adding-a-new-column/m-p/1503098#M232743</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-18T12:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: ALV adding a new column</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-adding-a-new-column/m-p/1503099#M232744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi baran ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are alternative ways if you're creating it for use in list viewer you don't have to use methods.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;use this for merging fields that you use in your &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;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        = sy-repid&lt;/P&gt;&lt;P&gt;      i_internal_tabname     = 'WT_LIST'&lt;/P&gt;&lt;P&gt;      i_client_never_display = 'X'&lt;/P&gt;&lt;P&gt;    i_inclname        =    gc_include_name&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      ct_fieldcat            = wt_fcat2&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;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------" /&gt;*&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to append directly or after the fieldcatalog merge&lt;/P&gt;&lt;P&gt;such as : &lt;/P&gt;&lt;P&gt;     CLEAR ws_fcat.&lt;/P&gt;&lt;P&gt;    ws_fcat-fieldname = 'BANKN'.&lt;/P&gt;&lt;P&gt;    ws_fcat-tabname   = 'WT_VENDOR'.&lt;/P&gt;&lt;P&gt;    ws_fcat-ref_fieldname = 'BANKN'.&lt;/P&gt;&lt;P&gt;    ws_fcat-ref_tabname   = 'LFBK'.&lt;/P&gt;&lt;P&gt;    ws_fcat-input         = wv_edit.&lt;/P&gt;&lt;P&gt;    APPEND ws_fcat TO wt_fcat.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------------" /&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2006 12:38:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-adding-a-new-column/m-p/1503099#M232744</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-18T12:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: ALV adding a new column</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-adding-a-new-column/m-p/1503100#M232745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Baran&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you ALV list is based on a DDIC structure you can use function module LVC_FIELDCATALOG_MERGE to create the fieldcatalog.&lt;/P&gt;&lt;P&gt;The documentation of the function module says that you can also use a structure defined within your application. However, this poses some restrictions on the structure definition. Therefore I disregard this option and almost always define a DDIC stucture for my ALV lists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;   Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2006 12:40:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-adding-a-new-column/m-p/1503100#M232745</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2006-08-18T12:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: ALV adding a new column</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-adding-a-new-column/m-p/1503101#M232746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Baran&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module REUSE_ALV_FIELDCATALOG_MERGE returns the fieldcatalog in table type SLIS_T_FIELDCAT_ALV which is not compatible with the requirements of CL_GUI_ALV_GRID. You have to convert SLIS_T_FIELDCAT_ALV to LVC_T_FCAT in order to use (function module availabe for this conversion).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All these REUSE_... function modules belong to the old-fashioned way to create ALV lists. If you do not have specific requirements (e.g. hierarchical ALV lists) then I recommend to exclusively use ABAP-OO means (classes, e.g. CL_GUI_ALV_GRID) for ALV lists.&lt;/P&gt;&lt;P&gt;At the beginning the effort for learing is higher yet the reward in the long term is a much higher flexibility in coding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;   Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2006 13:05:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-adding-a-new-column/m-p/1503101#M232746</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2006-08-18T13:05:01Z</dc:date>
    </item>
  </channel>
</rss>

