<?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: Remove a column using CL_SALV_COLUMNS_TABLE class in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-a-column-using-cl-salv-columns-table-class/m-p/2561020#M584051</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help. My problem is solved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Jul 2007 13:05:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-13T13:05:51Z</dc:date>
    <item>
      <title>Remove a column using CL_SALV_COLUMNS_TABLE class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-a-column-using-cl-salv-columns-table-class/m-p/2561014#M584045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem using CL_SALV_COLUMNS_TABLE class. I need to remove a colum from the report output and the method that i think it could help me is REMOVE_COLUM. However, this method is protected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An alternative soluction is to use the method SET_VISIBLE from class CL_SALV_COLUMN, but in this way i cannot eliminate the colum and that is my necesity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;¿Can you help me with this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2007 22:19:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-a-column-using-cl-salv-columns-table-class/m-p/2561014#M584045</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-12T22:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: Remove a column using CL_SALV_COLUMNS_TABLE class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-a-column-using-cl-salv-columns-table-class/m-p/2561015#M584046</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;I am not sure of an other method..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a local class in you program and inherit the class CL_SALV_COLUMNS_TABLE ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the new class create a method ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the new method..call the protected method using the object ME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD me-&amp;gt;remove_column&lt;/P&gt;&lt;P&gt;              .............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in your program create an object for your local class and call the method you created..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2007 22:25:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-a-column-using-cl-salv-columns-table-class/m-p/2561015#M584046</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-12T22:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Remove a column using CL_SALV_COLUMNS_TABLE class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-a-column-using-cl-salv-columns-table-class/m-p/2561016#M584047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naren,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally i can use the method REMOVE_COLUMN thanks to your answer. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, my problem continue. I used the method GET_COLUMNS from CL_SALV_TABLE class to obtain all columns that belong to the internal table that contain the data to be display in the report. It returned an instance from CL_SALV_COLUMNS_TABLE. I need to link the object that i instantiated from the local class to the object which contains the name of all columns in order to delete from the columns table the column that i don´t need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help, excuse me if my question is a little complicated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2007 23:11:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-a-column-using-cl-salv-columns-table-class/m-p/2561016#M584047</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-12T23:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: Remove a column using CL_SALV_COLUMNS_TABLE class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-a-column-using-cl-salv-columns-table-class/m-p/2561017#M584048</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;I think I understood your question..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you create an object for the local class(that you inherited the CL_SALV_COLUMNS_TABLE )..That will be your main object to do all the operations..Use this object to remove the columns and call the methods that is available in the class CL_SALV_COLUMNS_TABLE..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do not create another instance for the class CL_SALV_COLUMNS_TABLE again..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope I understood your question..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2007 23:37:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-a-column-using-cl-salv-columns-table-class/m-p/2561017#M584048</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-12T23:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Remove a column using CL_SALV_COLUMNS_TABLE class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-a-column-using-cl-salv-columns-table-class/m-p/2561018#M584049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andres,  please use the method SET_TECHNICAL, this should remove your column.  For an example, see any program which starts with SALV&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, 12 Jul 2007 23:52:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-a-column-using-cl-salv-columns-table-class/m-p/2561018#M584049</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-07-12T23:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Remove a column using CL_SALV_COLUMNS_TABLE class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-a-column-using-cl-salv-columns-table-class/m-p/2561019#M584050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a complete example of what I mean.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

REPORT zrich_0001.

DATA: ispfli TYPE TABLE OF spfli.

DATA: gr_table TYPE REF TO cl_salv_table.
DATA: gr_columns TYPE REF TO cl_salv_columns_table.
DATA: gr_column TYPE REF TO cl_salv_column_table.
DATA: gr_functions TYPE REF TO cl_salv_functions.

START-OF-SELECTION.

  SELECT * INTO TABLE ispfli FROM spfli.


  cl_salv_table=&amp;gt;factory(
    IMPORTING
      r_salv_table   = gr_table
    CHANGING
      t_table        = ispfli ).

  gr_functions =  gr_table-&amp;gt;get_functions( ).
  gr_functions-&amp;gt;set_all( abap_true ).

  gr_columns = gr_table-&amp;gt;get_columns( ).
  gr_column ?= gr_columns-&amp;gt;get_column( 'MANDT' ).
  gr_column-&amp;gt;set_technical( abap_true ).

  gr_table-&amp;gt;display( ).

&lt;/CODE&gt;&lt;/PRE&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>Fri, 13 Jul 2007 00:50:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-a-column-using-cl-salv-columns-table-class/m-p/2561019#M584050</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-07-13T00:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Remove a column using CL_SALV_COLUMNS_TABLE class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-a-column-using-cl-salv-columns-table-class/m-p/2561020#M584051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help. My problem is solved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2007 13:05:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-a-column-using-cl-salv-columns-table-class/m-p/2561020#M584051</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-13T13:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: Remove a column using CL_SALV_COLUMNS_TABLE class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-a-column-using-cl-salv-columns-table-class/m-p/2561021#M584052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" data-avatarid="23068" data-externalid="" data-presence="null" data-userid="26510" data-username="narendran.muthukumaran" href="https://answers.sap.com/people/narendran.muthukumaran"&gt;Narendran &lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CL_SALV_COLUMNS_TABLE is a final class. So it will show a syntax error.&lt;/P&gt;&lt;P&gt;So could you please suggest.&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;Regards,&lt;/P&gt;&lt;P&gt;Saurabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2014 03:04:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-a-column-using-cl-salv-columns-table-class/m-p/2561021#M584052</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-04-01T03:04:53Z</dc:date>
    </item>
  </channel>
</rss>

