<?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: Dynamically hiding Table Control Column? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-hiding-table-control-column/m-p/3661252#M881897</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;loop at screen.
  if screen-name = 'SCREEN_FIELD2'.  " Column 2
    screen-active = 0.
    modify screen.
  endif.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This set of statements should be incluced in the PBO of the table control loop module...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Apr 2008 03:44:36 GMT</pubDate>
    <dc:creator>gopi_narendra</dc:creator>
    <dc:date>2008-04-14T03:44:36Z</dc:date>
    <item>
      <title>Dynamically hiding Table Control Column?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-hiding-table-control-column/m-p/3661251#M881896</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;How can one dynamically hide a column of a given table control? Say youhave a three-column table and at run time you only want to show columns1 and 3. How do you hide column 2 programmatically?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pranshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 03:31:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-hiding-table-control-column/m-p/3661251#M881896</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T03:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically hiding Table Control Column?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-hiding-table-control-column/m-p/3661252#M881897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;loop at screen.
  if screen-name = 'SCREEN_FIELD2'.  " Column 2
    screen-active = 0.
    modify screen.
  endif.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This set of statements should be incluced in the PBO of the table control loop module...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 03:44:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-hiding-table-control-column/m-p/3661252#M881897</guid>
      <dc:creator>gopi_narendra</dc:creator>
      <dc:date>2008-04-14T03:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically hiding Table Control Column?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-hiding-table-control-column/m-p/3661253#M881898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, &lt;/P&gt;&lt;P&gt;we have a type group for table control ... &lt;/P&gt;&lt;P&gt;cxtab ... &lt;/P&gt;&lt;P&gt;CXTAB_CONTROL type scxtab_control,&lt;/P&gt;&lt;P&gt;just double click on ... scxtab_control,&lt;/P&gt;&lt;P&gt;double click on cols ... u get all the field relating to Columns of Table control ... &lt;/P&gt;&lt;P&gt;Just mention in the PBO ... &lt;/P&gt;&lt;P&gt;loop at screen.&lt;/P&gt;&lt;P&gt;if cols-index = 2.&lt;/P&gt;&lt;P&gt;   cols-invisible = 'X'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 03:55:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-hiding-table-control-column/m-p/3661253#M881898</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T03:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically hiding Table Control Column?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-hiding-table-control-column/m-p/3661254#M881899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pranshu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we can disable the column by making it display only&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now assume the name of your table control is ZTABLECONT..double click on the screen painter on the table control..these 2 names must be the same....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you need to disable columns of table control as a part of user action..like say click of a button..it can be entered in PAI by checking the sy-ucomm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data declaration:&lt;/P&gt;&lt;P&gt;data : cols like line of ZTABLECONT-cols.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Case sy-ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when 'PUSH'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at ZTABLECONT-cols into cols.&lt;/P&gt;&lt;P&gt;if cols-screen-input = '1'.&lt;/P&gt;&lt;P&gt;cols-screen-input = '0'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;modify ZTABLECONT-cols from cols index sy-tabix.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will disable all the columns&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for a particular column do the following&lt;/P&gt;&lt;P&gt;For this imagine you have 5 columns&lt;/P&gt;&lt;P&gt;in the below code &lt;/P&gt;&lt;P&gt;index = 1 =&amp;gt; column 1&lt;/P&gt;&lt;P&gt;index = 2 =&amp;gt; column 2&lt;/P&gt;&lt;P&gt;index = 3 =&amp;gt; column 3&lt;/P&gt;&lt;P&gt;index = 4 =&amp;gt; column 4&lt;/P&gt;&lt;P&gt;index = 5 =&amp;gt; column 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the below code , only column2 will be disabled....&lt;/P&gt;&lt;P&gt;so whicever column you want to disable ..just give the index&lt;/P&gt;&lt;P&gt;for multiple disabling..just write the code accordingly &lt;/P&gt;&lt;P&gt;LOOP AT ZTABLECONT-cols INTO cols WHERE index = 2.&lt;/P&gt;&lt;P&gt;IF cols-screen-input = '1'.&lt;/P&gt;&lt;P&gt;cols-screen-input = '0'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;MODIFY ZTABLECONT-cols FROM cols INDEX sy-tabix.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls check and revert...the code works and is being used in active code and close the thread if issue is solved&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Byju&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Apr 14, 2008 6:24 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 04:08:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-hiding-table-control-column/m-p/3661254#M881899</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T04:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically hiding Table Control Column?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-hiding-table-control-column/m-p/3661255#M881900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gopi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you have not read the query properly , it is about hiding a column in table control not on screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at screen will never work on table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pranshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 04:35:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-hiding-table-control-column/m-p/3661255#M881900</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T04:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically hiding Table Control Column?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-hiding-table-control-column/m-p/3661256#M881901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so , did u mean that u dont have a screen for a table control,&lt;/P&gt;&lt;P&gt;if so how did u place ur table control. and where?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generally a table control is placed on a screen.&lt;/P&gt;&lt;P&gt;see the below examples&lt;/P&gt;&lt;P&gt;    DEMO_DYNPRO_TABCONT_LOOP&lt;/P&gt;&lt;P&gt;    DEMO_DYNPRO_TABCONT_LOOP_AT&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROCESS BEFORE OUTPUT.
  MODULE STATUS_0100.
  LOOP WITH CONTROL FLIGHTS. " assuming FLIGHTS is the table control name.
    MODULE FILL_TABLE_CONTROL.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now in the module fill_table_Control , you should be writing the code which i mentioned in my above post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 05:22:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-hiding-table-control-column/m-p/3661256#M881901</guid>
      <dc:creator>gopi_narendra</dc:creator>
      <dc:date>2008-04-14T05:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically hiding Table Control Column?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-hiding-table-control-column/m-p/3661257#M881902</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;put an 'X' in the no_out field of the field catalog of your alv for each column that you want hidden. do this on the PBO module of your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regars,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 05:57:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-hiding-table-control-column/m-p/3661257#M881902</guid>
      <dc:creator>peter_ruiz2</dc:creator>
      <dc:date>2008-04-14T05:57:28Z</dc:date>
    </item>
  </channel>
</rss>

