<?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: Changing Column Names in ALV Object Model in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-column-names-in-alv-object-model/m-p/4904685#M1145241</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the DDICTXT field of the fielcat structure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 May 2009 11:01:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-28T11:01:46Z</dc:date>
    <item>
      <title>Changing Column Names in ALV Object Model</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-column-names-in-alv-object-model/m-p/4904677#M1145233</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;In a report development using ALV Object Model, I am required to over write the text given in the data elements for all the fields and display customized text, for the ALV column texts. This is proving to be rather tricky and doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read that to do this, we need to delete the DDIC bindings for the columns, which could be done through CL_SALV_WD_COLUMN_HEADER-&amp;gt;SET_PROP_DDIC_BINDING_FIELD. To understand it's usage I researched some more and found the thread: &lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="6429329"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I understood from this thread is that the above mentioned class is for use in Web Dynpros. My query is, can't this be used in the context outside of Web Dynpro? If yes, please guide me on how to instantiate classes CL_SALV_WD_COLUMN and CL_SALV_WD_COLUMN_HEADER. If no, please suggest an alternative.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Vidya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2008 14:36:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-column-names-in-alv-object-model/m-p/4904677#M1145233</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-12T14:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Column Names in ALV Object Model</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-column-names-in-alv-object-model/m-p/4904678#M1145234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vidya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create the Field Catlog like this in your object oriented ALV also.&lt;/P&gt;&lt;P&gt;  lv_fldcat-row_pos   = '1'.&lt;/P&gt;&lt;P&gt;  lv_fldcat-col_pos   = '1'.&lt;/P&gt;&lt;P&gt;  lv_fldcat-fieldname = 'VBELN'.&lt;/P&gt;&lt;P&gt;  lv_fldcat-tabname   = 'IT_OUTPUT'.&lt;/P&gt;&lt;P&gt;  lv_fldcat-outputlen = 10.&lt;/P&gt;&lt;P&gt;  lv_fldcat-scrtext_m = 'Order'.&lt;/P&gt;&lt;P&gt;  lv_fldcat-icon = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Neha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2008 18:38:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-column-names-in-alv-object-model/m-p/4904678#M1145234</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-12T18:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Column Names in ALV Object Model</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-column-names-in-alv-object-model/m-p/4904679#M1145235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may try with SET_DDIC_REFERENCE or APPLY_DDIC_STRUCTURE methods of CL_SALV_COLUMN class Change DDIC reference for an individual column/for several columns ([Change of DDIC Reference for a Column|http://help.sap.com/saphelp_sm32/helpdata/en/2c/762c41089b6e24e10000000a155106/frameset.htm])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you only want to change the texts (header, selection) try with SET_LONG_TEXT,  SET_MEDIUM_TEXT and SET_SHORT_TEXT methods of CL_SALV_COLUMN. ([Column Header|http://help.sap.com/saphelp_sm32/helpdata/en/e3/e3eb40c4f8712ae10000000a155106/frameset.htm])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read the documentation in the above given links and try some search at sdn on keywords like&lt;/P&gt;&lt;P&gt;- [GET_COLUMN ALV|https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_all&amp;amp;query=get_column+alv&amp;amp;adv=false&amp;amp;sortby=cm_rnd_rankvalue]&lt;/P&gt;&lt;P&gt;- [SET_DDIC_REFERENCE|https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_all&amp;amp;query=set_ddic_reference&amp;amp;adv=false&amp;amp;sortby=cm_rnd_rankvalue]&lt;/P&gt;&lt;P&gt;- [SET_LONG_TEXT|https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_all&amp;amp;query=set_long_text&amp;amp;adv=false&amp;amp;sortby=cm_rnd_rankvalue]&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2008 18:45:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-column-names-in-alv-object-model/m-p/4904679#M1145235</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2008-12-12T18:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Column Names in ALV Object Model</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-column-names-in-alv-object-model/m-p/4904680#M1145236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to do this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: gr_columns    type ref to cl_salv_columns_table.
...
...
...
gr_column ?= gr_columns-&amp;gt;get_column( text-112 ).   " text-112 = SIGNED
gr_column-&amp;gt;set_long_text( 'Signed by Approver' ).   " Here Signed by Approver is the custom heading for the column
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2008 18:47:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-column-names-in-alv-object-model/m-p/4904680#M1145236</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-12-12T18:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Column Names in ALV Object Model</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-column-names-in-alv-object-model/m-p/4904681#M1145237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can use the GET_COLUMNS and SET_COLUMNS method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With GET_COLUMNS you get a reference to the individual column objects of the ALV output and make all the technical settings for a column. Once you a reference to each column, you case use the SET_COLUMNS method of each column reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[GET_COLUMNS|http://help.sap.com/saphelp_nw04/helpdata/en/5e/88d440e14f8431e10000000a1550b0/frameset.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[SET_COLUMNS|http://help.sap.com/saphelp_nw04/helpdata/en/e3/e3eb40c4f8712ae10000000a155106/content.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Advait&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2008 18:57:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-column-names-in-alv-object-model/m-p/4904681#M1145237</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-12T18:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Column Names in ALV Object Model</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-column-names-in-alv-object-model/m-p/4904682#M1145238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I thank all of you for trying to help me out. But I'd like to mention here that SET_LONG_TEXT, SET_MEDIUM_TEXT and SET_SHORT_TEXT are not overwriting the labels of the data elements. There is a lot of shuffling around and manipulation that needs to be done, with respect to the output length and the length of the customized column text. Hence, it would probably suit me best if I am somehow able to delink the DDIC reference from the column. Do let me know your thoughts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Vidya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2008 19:45:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-column-names-in-alv-object-model/m-p/4904682#M1145238</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-12T19:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Column Names in ALV Object Model</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-column-names-in-alv-object-model/m-p/4904683#M1145239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vidya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I am not sure? But I would re-build my internal table dynamically and use that instead of the structure being used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt; Gokul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2008 22:15:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-column-names-in-alv-object-model/m-p/4904683#M1145239</guid>
      <dc:creator>Bhaskar_K1</dc:creator>
      <dc:date>2008-12-12T22:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Column Names in ALV Object Model</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-column-names-in-alv-object-model/m-p/4904684#M1145240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Feb 2009 04:18:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-column-names-in-alv-object-model/m-p/4904684#M1145240</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-26T04:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Column Names in ALV Object Model</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-column-names-in-alv-object-model/m-p/4904685#M1145241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the DDICTXT field of the fielcat structure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2009 11:01:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-column-names-in-alv-object-model/m-p/4904685#M1145241</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-28T11:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Column Names in ALV Object Model</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-column-names-in-alv-object-model/m-p/4904686#M1145242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all if you had used "LVC_FIELDCATALOG_MERGE" and&amp;nbsp; "REUSE_ALV_GRID_DISPLAY_LVC" Function modules then the columns name will come form DDIC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But to overwrite this you can use this code for every single column where you want the different name than DDIC. try this out:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fldcat&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;seltext &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'&lt;STRONG&gt;Location&lt;/STRONG&gt;'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; wa_fldcat&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;reptext &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;&lt;STRONG&gt;'Location&lt;/STRONG&gt;'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; wa_fldcat&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;scrtext_s &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;wa_fldcat&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;scrtext_m &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;wa_fldcat&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;scrtext_l &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'&lt;STRONG&gt;Location&lt;/STRONG&gt;'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;MODIFY &lt;/SPAN&gt;it_fldcat &lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;wa_fldcat &lt;SPAN class="L0S52"&gt;TRANSPORTING &lt;/SPAN&gt;seltext reptext scrtext_l scrtext_s scrtext_m &lt;SPAN class="L0S52"&gt;WHERE &lt;/SPAN&gt;fieldname &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'BTEXT'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;1. You need to know which name you want as column name like I had used &lt;STRONG&gt;Location &lt;/STRONG&gt; instead of "&lt;STRONG&gt;Personnel Subarea Text&lt;/STRONG&gt;"&lt;STRONG&gt;,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;2. and its table field name from which it was earlier picking the name....like I had &lt;STRONG&gt;"BTEXT"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;STRONG&gt;3. &lt;/STRONG&gt;define &lt;STRONG style="font-size: 13.3333px;"&gt;it_fldcat&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; type &lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;lvc_t_fcat. &lt;/STRONG&gt;and&lt;STRONG style="font-size: 13.3333px;"&gt; &lt;/STRONG&gt;&lt;STRONG&gt;wa_fldcat&lt;/STRONG&gt; type &lt;STRONG&gt;lvc_s_fcat.&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jul 2016 10:46:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-column-names-in-alv-object-model/m-p/4904686#M1145242</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-07-11T10:46:10Z</dc:date>
    </item>
  </channel>
</rss>

