<?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 Deactivate Single row in Table Control in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/deactivate-single-row-in-table-control/m-p/6512408#M1423689</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a table control in which all the fields are editable. I have created a checkbox so that i can select only those records i which want to edit or  delete. Now my requirement is that when I select a single record and click on deactivate button ( I have created buttons for Delete, Edit &amp;amp; Deactivate ) the entire record should be deactivated or be displayed in display mode so that the same record cannot be futher selected to Edit or Delete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried searching in the forums , but could not resolve the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Jan 2010 09:50:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-01-01T09:50:14Z</dc:date>
    <item>
      <title>Deactivate Single row in Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deactivate-single-row-in-table-control/m-p/6512408#M1423689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a table control in which all the fields are editable. I have created a checkbox so that i can select only those records i which want to edit or  delete. Now my requirement is that when I select a single record and click on deactivate button ( I have created buttons for Delete, Edit &amp;amp; Deactivate ) the entire record should be deactivated or be displayed in display mode so that the same record cannot be futher selected to Edit or Delete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried searching in the forums , but could not resolve the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2010 09:50:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deactivate-single-row-in-table-control/m-p/6512408#M1423689</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-01T09:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Deactivate Single row in Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deactivate-single-row-in-table-control/m-p/6512409#M1423690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Priti , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are filling records from internal table to table control , In PBO of screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At , this place you need to write your logic to consider the checkbox value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to modify screen like below code :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    LOOP AT SCREEN.
     " Check Condition to deactivate
        screen-input = '0'.   
    ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also search sdn on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2010 10:10:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deactivate-single-row-in-table-control/m-p/6512409#M1423690</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-01T10:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: Deactivate Single row in Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deactivate-single-row-in-table-control/m-p/6512410#M1423691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i hope this links will help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="946824"&gt;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://wiki.sdn.sap.com/wiki/display/ABAP/Module" target="test_blank"&gt;http://wiki.sdn.sap.com/wiki/display/ABAP/Module&lt;/A&gt;&lt;EM&gt;Pool&lt;/EM&gt;basics&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when 'deactive'&lt;/P&gt;&lt;P&gt;button is clicked read the table row index into tabcon-cols.&lt;/P&gt;&lt;P&gt;read that line by using index and make it invisible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample code to invisible 3 row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIDING A COLUMN&lt;/P&gt;&lt;P&gt;To hide a column we will use the INVISIBLE field of the structure CXTABA_CONTROL and set its value to 'X'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;e.g. To hide column number 3.&lt;/P&gt;&lt;P&gt;DATA col LIKE LINE OF tab-con-COLS .&lt;/P&gt;&lt;P&gt;READ TABLE tab_con-COLS INTO col WHERE index = 3. "tab_con is the name                                                                                &lt;/P&gt;&lt;P&gt;" of table control.&lt;/P&gt;&lt;P&gt;col-INVISIBLE = 3.&lt;/P&gt;&lt;P&gt;MODIFY  tab-con-COLS FROM col INDEX 3. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DISABLING INPUT &lt;/P&gt;&lt;P&gt;To disable/enable fields of a column we will use the field SCREEN-INPUT of the&lt;/P&gt;&lt;P&gt;structure CXTAB_COLUMN and set its value to 0 or 1.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;e.g. To disable input at column 3 of the table control .&lt;/P&gt;&lt;P&gt;DATA col LIKE LINE OF tab_con-COLS.&lt;/P&gt;&lt;P&gt;READ TABLE tab_con-COLS INTO col INDEX 3.&lt;/P&gt;&lt;P&gt;col-SCREEN-INPUT = 0 .&lt;/P&gt;&lt;P&gt;MODIFY tab_con-COLS FROM col INDEX 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;sarath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2010 10:19:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deactivate-single-row-in-table-control/m-p/6512410#M1423691</guid>
      <dc:creator>sarath_7</dc:creator>
      <dc:date>2010-01-01T10:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: Deactivate Single row in Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deactivate-single-row-in-table-control/m-p/6512411#M1423692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I already tried doing this but didnt work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u send a sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnks in advace&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2010 10:22:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deactivate-single-row-in-table-control/m-p/6512411#M1423692</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-01T10:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Deactivate Single row in Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deactivate-single-row-in-table-control/m-p/6512412#M1423693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Process flow will be :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PBO of screen , at this time nothing will be deactivated as checkbox is not clicked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then PAI , here you need to save the value of checkbox in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And now again PBO , now this check box value will decide with record will be activated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You missed to save the checkbox value in internal table in PAI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helpa you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2010 10:41:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deactivate-single-row-in-table-control/m-p/6512412#M1423693</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-01T10:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Deactivate Single row in Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deactivate-single-row-in-table-control/m-p/6512413#M1423694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Priti,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its little bit difficult to get the desired output using Table Control,, These can be achived using OO ALV. If posible use OOALV in the place of TC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kumar M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2010 18:27:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deactivate-single-row-in-table-control/m-p/6512413#M1423694</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-01T18:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Deactivate Single row in Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deactivate-single-row-in-table-control/m-p/6512414#M1423695</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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;in PBO
 
loop at itab with control tc.
module modify_screen. " If you place your loop at screen in this module the row will be editable/changed to disabled mode
endlooop.
 
in program.
module modify_screen.
 CASE ok.
    WHEN 'MOD'.  " Your Modify OK code
 
        LOOP AT SCREEN.
      IF jtab-mark = 'X'.
          IF screen-name = 'JTAB-MATNR'. " You can use screen group for the fields you want editable
" Assign a GRP1 for all key fields and GRP2 for other fields
" if screen-group2 = 'GRP2'. " All the screens belong to GRP2 will be modified here
            screen-input = 0.
            MODIFY SCREEN.
          ENDIF.
ELSE.
IF SCREEN-NAME = 'JTAB-MATNR'.
SCREEN-INPUT = 1.
MODIFY SCREEN.
ENDIF.
        ENDLOOP.
clear jtab-mark.
modify jtab index sy-tabix. " This clears the Table control Row selector 
" If you dont want just remove this.
  ENDCASE.
endmodule.
 
in PAI
 
loop at  itab.
module modify_tab.
" In Top include
data : begin of jtab occurs 0,
mark type c,
 matnr type matnr,
maktx type maktx,
end of jtab.
 
" dont forget to enter JTAB-MARK in screenpainter at Table control W/SelColumn
in program
 
MODULE modify_tab.
  DESCRIBE TABLE jtab LINES tc-lines.
  MODIFY jtab INDEX tc-current_line. " This will transfer the Selected line back to internal table of program
ENDMODULE. 
endloop.
" Happy new year to you ALL
" This is a tested program and working fine in my system&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Cheerz&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jan 2010 03:12:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deactivate-single-row-in-table-control/m-p/6512414#M1423695</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-02T03:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: Deactivate Single row in Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deactivate-single-row-in-table-control/m-p/6512415#M1423696</link>
      <description>&lt;P&gt;You can do it using statement LOOP AT spfli_tab INTO spfli &lt;STRONG&gt;WITH CONTROL&lt;/STRONG&gt; flight_tab.&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;BR /&gt;MODULE prepare_tab.&lt;BR /&gt;&lt;STRONG&gt;LOOP AT spfli_tab INTO spfli WITH CONTROL flight_tab.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;module disable_row. " you can write your logic inside module disable_row with statements loop at screen and screen-input = 0.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;BR /&gt;PROCESS AFTER INPUT.&lt;BR /&gt;LOOP AT spfli_tab.&lt;BR /&gt;MODULE modify_tab.&lt;BR /&gt;ENDLOOP.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 18:52:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deactivate-single-row-in-table-control/m-p/6512415#M1423696</guid>
      <dc:creator>kzak</dc:creator>
      <dc:date>2020-02-19T18:52:53Z</dc:date>
    </item>
  </channel>
</rss>

