<?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 Change Button in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-change-button/m-p/5149026#M1193225</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nikhil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take a PF-Status with two buttons, one for display with function code &lt;STRONG&gt;DISPLAY&lt;/STRONG&gt; and other for editing with function code &lt;STRONG&gt;EDIT&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take the group1 of fields as &lt;STRONG&gt;'ABC'&lt;/STRONG&gt;, which needs to editable when user clicks &lt;STRONG&gt;EDIT&lt;/STRONG&gt; button, and read-only when user click &lt;STRONG&gt;DISPLAY&lt;/STRONG&gt; button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When user clicks display, records are read-only and if user clicks edit button, then records can be edited.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At PBO include code:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
module modify_screen.
  case sy-ucomm.
    when 'EDIT'.
      set pf-status 'Z_PFSTAT' excluding 'EDIT'.
      if screen-group1 = 'ABC'.
        loop at screen.
          screen-input = 1. "to make the records as editable
          screen-active = 1.
        endloop.
        modify screen.
      endif.
    when 'DISPLAY'.
      set pf-status 'Z_PFSTAT' excluding 'DISPLAY'.
      if screen-group1 = 'ABC'.
        loop at screen.
          screen-input = 0. "to make fields read-only
          screen-active = 0.
        endloop.
        modify screen.
      endif.
  endcase.
endmodule.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when user click EDIT button the table control rows are in now editable mode and the button EDIT is excluded from the pf-status and display button is included.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand, when user clicks DISPLAY button, the records of table control are now in read-only mode and DISPLAY button is excluded and EDIT button is included in the pf-status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will work as per your requirement.&lt;/P&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>Fri, 23 Jan 2009 12:26:56 GMT</pubDate>
    <dc:creator>I355602</dc:creator>
    <dc:date>2009-01-23T12:26:56Z</dc:date>
    <item>
      <title>TABLE Control Change Button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-change-button/m-p/5149022#M1193221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to add CHANGE button to my table control.&lt;/P&gt;&lt;P&gt;Right now in dialog program I am showing table control with line count = 100.&lt;/P&gt;&lt;P&gt;I need to provide CHANGE button through which table control will become read only as well as if user press that button again it will go into EDIT mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please provide some suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Nikhil J.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jan 2009 11:15:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-change-button/m-p/5149022#M1193221</guid>
      <dc:creator>former_member221838</dc:creator>
      <dc:date>2009-01-23T11:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: TABLE Control Change Button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-change-button/m-p/5149023#M1193222</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;Go through this program: DEMO_DYNPRO_TABCONT_LOOP_AT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deepthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jan 2009 11:30:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-change-button/m-p/5149023#M1193222</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-23T11:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: TABLE Control Change Button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-change-button/m-p/5149024#M1193223</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;pls go through the link below , which explains the step by step process to insert data from table control in to z table... &lt;/P&gt;&lt;P&gt;[&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="6886287"&gt;&lt;/A&gt;]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope the content is useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;kindly close the thread if the issue iss resolved.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;R@sap&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jan 2009 11:35:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-change-button/m-p/5149024#M1193223</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-23T11:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: TABLE Control Change Button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-change-button/m-p/5149025#M1193224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Add two button in your Table Control&lt;/P&gt;&lt;P&gt;Assign a Function Code to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In user Command write code against the Function Code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e,&lt;/P&gt;&lt;P&gt;Loop At Screen.&lt;/P&gt;&lt;P&gt;if change button is pressed.&lt;/P&gt;&lt;P&gt;Screen input =1.&lt;/P&gt;&lt;P&gt;if display button is pressed.&lt;/P&gt;&lt;P&gt;Screen input = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sandipan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jan 2009 11:42:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-change-button/m-p/5149025#M1193224</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-23T11:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: TABLE Control Change Button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-change-button/m-p/5149026#M1193225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nikhil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take a PF-Status with two buttons, one for display with function code &lt;STRONG&gt;DISPLAY&lt;/STRONG&gt; and other for editing with function code &lt;STRONG&gt;EDIT&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take the group1 of fields as &lt;STRONG&gt;'ABC'&lt;/STRONG&gt;, which needs to editable when user clicks &lt;STRONG&gt;EDIT&lt;/STRONG&gt; button, and read-only when user click &lt;STRONG&gt;DISPLAY&lt;/STRONG&gt; button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When user clicks display, records are read-only and if user clicks edit button, then records can be edited.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At PBO include code:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
module modify_screen.
  case sy-ucomm.
    when 'EDIT'.
      set pf-status 'Z_PFSTAT' excluding 'EDIT'.
      if screen-group1 = 'ABC'.
        loop at screen.
          screen-input = 1. "to make the records as editable
          screen-active = 1.
        endloop.
        modify screen.
      endif.
    when 'DISPLAY'.
      set pf-status 'Z_PFSTAT' excluding 'DISPLAY'.
      if screen-group1 = 'ABC'.
        loop at screen.
          screen-input = 0. "to make fields read-only
          screen-active = 0.
        endloop.
        modify screen.
      endif.
  endcase.
endmodule.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when user click EDIT button the table control rows are in now editable mode and the button EDIT is excluded from the pf-status and display button is included.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand, when user clicks DISPLAY button, the records of table control are now in read-only mode and DISPLAY button is excluded and EDIT button is included in the pf-status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will work as per your requirement.&lt;/P&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>Fri, 23 Jan 2009 12:26:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-change-button/m-p/5149026#M1193225</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-01-23T12:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: TABLE Control Change Button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-change-button/m-p/5149027#M1193226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Guys... Overwhelming response  &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Nikhil Jathar on Jan 23, 2009 7:16 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jan 2009 13:08:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-change-button/m-p/5149027#M1193226</guid>
      <dc:creator>former_member221838</dc:creator>
      <dc:date>2009-01-23T13:08:42Z</dc:date>
    </item>
  </channel>
</rss>

