<?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: Transaction programming - Making screen fields 'output only' in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/transaction-programming-making-screen-fields-output-only/m-p/3766808#M906346</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for table control to disable a column we use the cols property in the screen'..the tablecontrol-cols is set to zero to inactivate a column&lt;/P&gt;&lt;P&gt;&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....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Byju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 27 Apr 2008 05:39:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-27T05:39:40Z</dc:date>
    <item>
      <title>Transaction programming - Making screen fields 'output only'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transaction-programming-making-screen-fields-output-only/m-p/3766805#M906343</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;I have a problem concerning a screen - it is so that the screen is used by several transactions - Create 'plan', Display 'plan' and Change 'plan'. &lt;/P&gt;&lt;P&gt;When it's called from the 'Display' transaction I want the screen to be output-only. So I wrote something like this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE modify_screen OUTPUT. &lt;/P&gt;&lt;P&gt;if sy-tcode = 'ZAF03'. &lt;/P&gt;&lt;P&gt;loop at screen. &lt;/P&gt;&lt;P&gt;if screen-name cp 'I_AFPL*'. &lt;/P&gt;&lt;P&gt;screen-input = '0'. &lt;/P&gt;&lt;P&gt;modify screen. &lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;endloop. &lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;ENDMODULE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that this screen contains a tabstrip control. The subscreens on the pages of the tabstrip control contain table controls, and the table controls refer to some internal tables in the program. &lt;/P&gt;&lt;P&gt;All the fields which I want to make 'output only' are fields of internal tables beginning with 'I_AFPL' that's why the condition... &lt;/P&gt;&lt;P&gt;This works very well for the fields on the main screen, but not for the fields of the table controls on the tabstrip control... and I'm calling that module from the main screen and also from the subscreens of the 'pages' of the tabstrip control. In the debugger I see that the input is set to 0 but when the screen 'comes on screen' I can still do input in those fields... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me what I'm doing wrong? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 17:45:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transaction-programming-making-screen-fields-output-only/m-p/3766805#M906343</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-24T17:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction programming - Making screen fields 'output only'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transaction-programming-making-screen-fields-output-only/m-p/3766806#M906344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the PBO routine you should have code that looks like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PROCESS BEFORE OUTPUT.
*&amp;amp;spwizard: pbo flow logic for tablecontrol 'TBLCLT_MAIN'
  module TBLCLT_MAIN_change_tc_attr.
*&amp;amp;spwizard: module TBLCLT_MAIN_change_col_attr.
  loop at   IT_WK
       into WK_REC
       with control TBLCLT_MAIN
       cursor TBLCLT_MAIN-current_line.
*&amp;amp;spwizard:   module TBLCLT_MAIN_change_field_attr     "  your table cell attributes can be set here
  endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Paul Chapman on Apr 24, 2008 7:59 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 17:59:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transaction-programming-making-screen-fields-output-only/m-p/3766806#M906344</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-24T17:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction programming - Making screen fields 'output only'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transaction-programming-making-screen-fields-output-only/m-p/3766807#M906345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you call the MODULE in the LOOP of the table control? &lt;/P&gt;&lt;P&gt;Otherwise it didn't work! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is another possiblity to do this. This is described also in the &lt;/P&gt;&lt;P&gt;documentation for TableControls. &lt;/P&gt;&lt;P&gt;(Have a look at Fields of CXTAB*) &lt;/P&gt;&lt;P&gt;Example Program for Table Control from SAP: RSDEMO02 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Apr 2008 18:31:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transaction-programming-making-screen-fields-output-only/m-p/3766807#M906345</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-26T18:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction programming - Making screen fields 'output only'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transaction-programming-making-screen-fields-output-only/m-p/3766808#M906346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for table control to disable a column we use the cols property in the screen'..the tablecontrol-cols is set to zero to inactivate a column&lt;/P&gt;&lt;P&gt;&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....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Byju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Apr 2008 05:39:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transaction-programming-making-screen-fields-output-only/m-p/3766808#M906346</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-27T05:39:40Z</dc:date>
    </item>
  </channel>
</rss>

