<?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: table control col clearance in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-col-clearance/m-p/4968154#M1157956</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use it this way:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say on condition1 you want to hide a textbox with group1 &lt;STRONG&gt;ABC&lt;/STRONG&gt; and on condition2 you want to hide other four fields all having group1 as &lt;STRONG&gt;DEF&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now use the code:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
if &amp;lt;condition1&amp;gt;.
  if ( screen-group1 = 'ABC' ).
    loop at screen.
      screen-invisible = 1. "hide one field
      screen-active = 0.
    endloop.
    modify screen.
  else ( screen-group1 = 'DEF' ).
    loop at screen.
      screen-invisible = 0. "display other four fileds
      screen-active = 1.
    endloop.
    modify screen.
  endif.
elseif &amp;lt;codition2&amp;gt;.
  if ( screen-group1 = 'ABC' ).
    loop at screen.
      screen-invisible = 0. "display one field
      screen-active = 1.
    endloop.
    modify screen.
  else ( screen-group1 = 'DEF' ).
    loop at screen.
      screen-invisible = 1. "hide other four fields
      screen-active = 0.
    endloop.
    modify screen.
  endif.
endif.  
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Tarun Gambhir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Jan 2009 08:36:04 GMT</pubDate>
    <dc:creator>I355602</dc:creator>
    <dc:date>2009-01-08T08:36:04Z</dc:date>
    <item>
      <title>table control col clearance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-col-clearance/m-p/4968153#M1157955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;have a problem ,here i am pasting my code for the first condition am hiding two fields for the second condition am hiding four fields,but the problem is for the second condition also the first conditon fields are hiding could you please provide the solution which one  have to clear.&lt;/P&gt;&lt;P&gt;If first = 'X'.&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 'CREATE' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        loop at lv_control-cols  into control .&lt;/P&gt;&lt;P&gt;          IF control-index = 6 or&lt;/P&gt;&lt;P&gt;             control-index = 7 .&lt;/P&gt;&lt;P&gt;            control-invisible = 'X'.&lt;/P&gt;&lt;P&gt;            MODIFY lv_control-cols FROM control index sy-tabix.&lt;/P&gt;&lt;P&gt;            clear control.&lt;/P&gt;&lt;P&gt;          ENDIF.&lt;/P&gt;&lt;P&gt;        ENDLOOP.&lt;/P&gt;&lt;P&gt;    endcase .&lt;/P&gt;&lt;P&gt;  elseif second = 'X'.&lt;/P&gt;&lt;P&gt;    CASE Sy-ucomm.&lt;/P&gt;&lt;P&gt;      when 'CREATE' .&lt;/P&gt;&lt;P&gt;        clear control.&lt;/P&gt;&lt;P&gt;        loop at lv_control-cols  into control .&lt;/P&gt;&lt;P&gt;          IF control-index = 4 or&lt;/P&gt;&lt;P&gt;             control-index = 8 or&lt;/P&gt;&lt;P&gt;             control-index = 10 or&lt;/P&gt;&lt;P&gt;             control-index = 13 .&lt;/P&gt;&lt;P&gt;            control-invisible = 'X'.&lt;/P&gt;&lt;P&gt;            MODIFY lv_control-cols FROM control index sy-tabix.&lt;/P&gt;&lt;P&gt;            clear control.&lt;/P&gt;&lt;P&gt;          ENDIF.&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;  endif..&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 06:58:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-col-clearance/m-p/4968153#M1157955</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-08T06:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: table control col clearance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-col-clearance/m-p/4968154#M1157956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use it this way:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say on condition1 you want to hide a textbox with group1 &lt;STRONG&gt;ABC&lt;/STRONG&gt; and on condition2 you want to hide other four fields all having group1 as &lt;STRONG&gt;DEF&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now use the code:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
if &amp;lt;condition1&amp;gt;.
  if ( screen-group1 = 'ABC' ).
    loop at screen.
      screen-invisible = 1. "hide one field
      screen-active = 0.
    endloop.
    modify screen.
  else ( screen-group1 = 'DEF' ).
    loop at screen.
      screen-invisible = 0. "display other four fileds
      screen-active = 1.
    endloop.
    modify screen.
  endif.
elseif &amp;lt;codition2&amp;gt;.
  if ( screen-group1 = 'ABC' ).
    loop at screen.
      screen-invisible = 0. "display one field
      screen-active = 1.
    endloop.
    modify screen.
  else ( screen-group1 = 'DEF' ).
    loop at screen.
      screen-invisible = 1. "hide other four fields
      screen-active = 0.
    endloop.
    modify screen.
  endif.
endif.  
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Tarun Gambhir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 08:36:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-col-clearance/m-p/4968154#M1157956</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-01-08T08:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: table control col clearance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-col-clearance/m-p/4968155#M1157957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks gambhir,&lt;/P&gt;&lt;P&gt;but requirement is to hide the 1,2,3 colums in first condition and in second condition 2,5,6 cloumns like that, in my case maitaining group is not possible .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 09:15:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-col-clearance/m-p/4968155#M1157957</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-08T09:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: table control col clearance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-col-clearance/m-p/4968156#M1157958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use this alternative:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say you take the name of the these six fields as :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TextBox1 : TXT1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TextBox2 : TXT2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TextBox3 : TXT3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TextBox4 : TXT4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TextBox5 : TXT5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TextBox6 : TXT6&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
if &amp;lt;condition1&amp;gt;. "on which fields 1, 3 and 5 will hide and 2, 4 and 6 will display
  loop at screen.
    if ( screen-name = 'TXT1' ).
      screen-invisible = 1. "hide field 1
      screen-active = 0.
    elseif ( screen-name = 'TXT2' ).
      screen-invisible = 0. "display field 2
      screen-active = 1.
    elseif ( screen-name = 'TXT3' ).
      screen-invisible = 1. "hide field 3
      screen-active = 0.
    elseif ( screen-name = 'TXT4' ).
      screen-invisible = 0. "display field 4
      screen-active = 1.
    elseif ( screen-name = 'TXT5' ).
      screen-invisible = 1. "hide field 5
      screen-active = 0.
    elseif ( screen-name = 'TXT6' ).
      screen-invisible = 0. "display field 6
      screen-active = 1.
    endif.
    modify screen.
  endloop.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
if &amp;lt;condition2&amp;gt;. "on which fields 2, 4 and 6 will hide and 1, 3 and 5 will display
  loop at screen.
    if ( screen-name = 'TXT1' ).
      screen-invisible = 0. "display field 1
      screen-active = 1.
    elseif ( screen-name = 'TXT2' ).
      screen-invisible = 1. "hide field 2
      screen-active = 0.
    elseif ( screen-name = 'TXT3' ).
      screen-invisible = 0. "display field 3
      screen-active = 1.
    elseif ( screen-name = 'TXT4' ).
      screen-invisible = 1. "hide field 4
      screen-active = 0.
    elseif ( screen-name = 'TXT5' ).
      screen-invisible = 0. "display field 5
      screen-active = 1.
    elseif ( screen-name = 'TXT6' ).
      screen-invisible = 1. "hide field 6
      screen-active = 0.
    endif.
    modify screen.
  endloop.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Tarun Gambhir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 09:44:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-col-clearance/m-p/4968156#M1157958</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-01-08T09:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: table control col clearance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-col-clearance/m-p/4968157#M1157959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;try in this way..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CASE Sy-ucomm.
when 'CREATE' .

If first = 'X'.
loop at lv_control-cols into control .
IF control-index = 6 or
   control-index = 7 .
  control-invisible = 'X'.
MODIFY lv_control-cols FROM control index sy-tabix.
clear control.
ENDIF.
ENDLOOP.
elseif second = 'X'.
loop at lv_control-cols into control .
IF control-index = 4 or
control-index = 8 or
control-index = 10 or
control-index = 13 .
control-invisible = 'X'.
MODIFY lv_control-cols FROM control index sy-tabix.
clear control.
ENDIF.
ENDLOOP.
endif.

endcase .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 11:10:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-col-clearance/m-p/4968157#M1157959</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-08T11:10:44Z</dc:date>
    </item>
  </channel>
</rss>

