<?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 {oop} column Hide at runtime in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oop-column-hide-at-runtime/m-p/2224222#M477815</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your solution worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

In PAI we have to use 

  call method cl_gui_cfw=&amp;gt;set_new_ok_code
    exporting
      new_code = 'ENTR'.

In the PBO

  if g_custom_container is initial.
    perform f_create_and_init_alv.
  else.
    perform f_rebuild_fieldcat changing gt_fieldcat.
    call method g_grid-&amp;gt;set_frontend_fieldcatalog
       exporting
         it_fieldcatalog = gt_fieldcat[].
  call method  g_grid-&amp;gt;refresh_table_display.
  endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 28 Apr 2007 03:15:48 GMT</pubDate>
    <dc:creator>former_member194669</dc:creator>
    <dc:date>2007-04-28T03:15:48Z</dc:date>
    <item>
      <title>ALV {oop} column Hide at runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oop-column-hide-at-runtime/m-p/2224219#M477812</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 have a ALV report using OOp. In the report application toolbar i have 2 buttons (PF-Status)&lt;/P&gt;&lt;P&gt;If user click on button1 one of the column to be hide from display. But if click button2 then that column to be unhide and display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried this use NO_OUT or TECH field in the fieldcatalog. but no use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any info how to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Apr 2007 02:19:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oop-column-hide-at-runtime/m-p/2224219#M477812</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-04-28T02:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: ALV {oop} column Hide at runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oop-column-hide-at-runtime/m-p/2224220#M477813</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;Try this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the PBO if the container is not initial then call the method REFRESH_TABLE_DISPLAY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;creation of the ALV Grid Control&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  if g_custom_container is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;call the method grid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;call the method grid-&amp;gt;refresh_table_display.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endif.&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>Sat, 28 Apr 2007 02:41:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oop-column-hide-at-runtime/m-p/2224220#M477813</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-28T02:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: ALV {oop} column Hide at runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oop-column-hide-at-runtime/m-p/2224221#M477814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is that you can only set the fieldcat once for the SET_TABLE_FOR_FIRST_DISPLAY.  If you want to modify it afterwards, I think you could use the combination of the GET_FRONTEND_FIELDCATALOG and SET_FRONTEND_FIELDCATALOG methods.  So get the FC, read the specific line for the field and set the NO_OUT flag, modify the line and then pass this FC internal table to the SET_FRONTEND_FIELDCATALOG method.&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>Sat, 28 Apr 2007 02:51:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oop-column-hide-at-runtime/m-p/2224221#M477814</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-04-28T02:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: ALV {oop} column Hide at runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oop-column-hide-at-runtime/m-p/2224222#M477815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your solution worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

In PAI we have to use 

  call method cl_gui_cfw=&amp;gt;set_new_ok_code
    exporting
      new_code = 'ENTR'.

In the PBO

  if g_custom_container is initial.
    perform f_create_and_init_alv.
  else.
    perform f_rebuild_fieldcat changing gt_fieldcat.
    call method g_grid-&amp;gt;set_frontend_fieldcatalog
       exporting
         it_fieldcatalog = gt_fieldcat[].
  call method  g_grid-&amp;gt;refresh_table_display.
  endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Apr 2007 03:15:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oop-column-hide-at-runtime/m-p/2224222#M477815</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-04-28T03:15:48Z</dc:date>
    </item>
  </channel>
</rss>

