<?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: Input Enabling in Table control in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/input-enabling-in-table-control/m-p/5315680#M1225448</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refer to this piece of code..may be it is helpful to u&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
when 'ADD'.

***To insert or append an initial line into table control 
tabstripg8-activetab = 'LINE'.   "active tab in the tab strip control
loop at itabline.  "itabline is the internal table for line items
     if itabline-mark1 = 'X'.
        insert initial line into itabline.
        flag = '1'.
     endif.
endloop.
if flag '1'.
append initial line to itabline.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can also refer to the below post for module pool sample code.&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="4519327"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sravanthi Chilal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Mar 2009 11:12:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-10T11:12:56Z</dc:date>
    <item>
      <title>Input Enabling in Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/input-enabling-in-table-control/m-p/5315675#M1225443</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;   I am fresher and I am doing a module pool program where I have one table control. I am input disabling all the fields in Table control and when I press 'ADD' button only one line(row) shoule be input enabled( Like in SM30). May I know how it is possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2009 12:58:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/input-enabling-in-table-control/m-p/5315675#M1225443</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-05T12:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Input Enabling in Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/input-enabling-in-table-control/m-p/5315676#M1225444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. while creation time you shold be input enable the all the columns of table control&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. in PBO, change table control attributes module write the below logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DESCRIBE TABLE &amp;lt;gt_flink&amp;gt; LINES tcon_ch-lines.&lt;/P&gt;&lt;P&gt;  IF tcon_ch-lines EQ 0.&lt;/P&gt;&lt;P&gt;    tcon_ch-lines = 1.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. In PAI, at user command module for insert/delete buttons logic is same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;may be it is helpful to solve your issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2009 14:27:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/input-enabling-in-table-control/m-p/5315676#M1225444</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-05T14:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Input Enabling in Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/input-enabling-in-table-control/m-p/5315677#M1225445</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;try this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data : v_index type sy-tabix.
when 'ADD'.
describe table itab lines v_index.
v_index = v_index + 1.
insert initial line into itab index v_index.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Mar 2009 04:10:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/input-enabling-in-table-control/m-p/5315677#M1225445</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-06T04:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: Input Enabling in Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/input-enabling-in-table-control/m-p/5315678#M1225446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the PBO of your table control you can declare lke this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

  DATA : LIN TYPE I.

  DESCRIBE TABLE ITAB LINES LIN.

  TABC-LINES = LIN + 5.


&lt;/CODE&gt;&lt;/PRE&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;Regrds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mansi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Mar 2009 09:58:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/input-enabling-in-table-control/m-p/5315678#M1225446</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-06T09:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Input Enabling in Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/input-enabling-in-table-control/m-p/5315679#M1225447</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;Follow these steps:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;it_zekpo is my internal table w/o header line,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;wa_zekpo is work area.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Name of input/output fields on screen are:-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;wa_zekpo-field1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;wa_zekpo-field2, and so on...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take the group1 for all textboxes as &lt;STRONG&gt;'ABC'&lt;/STRONG&gt; in the table control&lt;/P&gt;&lt;P&gt;Keep all the textbox (i/o field) in table control as output only.&lt;/P&gt;&lt;P&gt;And when user clicks &lt;STRONG&gt;'ADD'&lt;/STRONG&gt; button, existing record are read-only and rest rows are input enabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using code:-&lt;/P&gt;&lt;P&gt;At screen logic:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PROCESS BEFORE OUTPUT.
*  MODULE status_8003.
 
  LOOP WITH CONTROL po_tb.
    MODULE read_data.
  ENDLOOP.
 
PROCESS AFTER INPUT.
*  MODULE user_command_8003.
 
  LOOP WITH CONTROL po_tb.
    MODULE modify_data.
  ENDLOOP.
 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PBO&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  READ_DATA  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
MODULE read_data OUTPUT.

  data : line_count type i.
 
  describe it_zekpo
  lines line_count.
 
  po_tb-lines = line_count + 10.
  "to increase the number of lines in table control dynamically

  READ TABLE it_zekpo INTO wa_zekpo INDEX po_tb-current_line. "po_tab is table control name
 
  CASE sy-ucomm.
    WHEN 'ADD'.  
      if sy-subrc = 0. 
        loop at screen.
          if screen-group1 = 'ABC'.
            screen-input = 0. "disable for input
          endif.
          modify screen.
        endloop.
      else.
        loop at screen.
          if screen-group1 = 'ABC'.
            screen-input = 1. "enable for input
          endif.
          modify screen.
        endloop.
      endif.
    WHEN 'SAVE'.
      loop at screen.
        if screen-group1 = 'ABC'.
          screen-input = 0. "disable for input
        endif.
        modify screen.
      endloop.
  ENDCASE.

"when user click ADD button rows with no data are enabled for input
"when user click SAVE button save data in internal table
"and then disable all rows again
ENDMODULE.                 " READ_DATA  OUTPUT
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PAI&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  MODIFY_DATA  INPUT
*&amp;amp;---------------------------------------------------------------------*
MODULE MODIFY_DATA INPUT.
  MODIFY IT_ZEKPO FROM WA_ZEKPO INDEX po_tb-currentline.
  "this will modify the contents of existing line
ENDMODULE.                 " MODIFY_DATA  INPUT
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Mar 2009 10:18:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/input-enabling-in-table-control/m-p/5315679#M1225447</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-03-06T10:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Input Enabling in Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/input-enabling-in-table-control/m-p/5315680#M1225448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refer to this piece of code..may be it is helpful to u&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
when 'ADD'.

***To insert or append an initial line into table control 
tabstripg8-activetab = 'LINE'.   "active tab in the tab strip control
loop at itabline.  "itabline is the internal table for line items
     if itabline-mark1 = 'X'.
        insert initial line into itabline.
        flag = '1'.
     endif.
endloop.
if flag '1'.
append initial line to itabline.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can also refer to the below post for module pool sample code.&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="4519327"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sravanthi Chilal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2009 11:12:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/input-enabling-in-table-control/m-p/5315680#M1225448</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-10T11:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Input Enabling in Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/input-enabling-in-table-control/m-p/5315681#M1225449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;just try this i'm sure u will get it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in SE51&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;process before output.&lt;/P&gt;&lt;P&gt;  module status_8000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop with control control.&lt;/P&gt;&lt;P&gt;    module fill_table_control.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;process after input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop with control control.&lt;/P&gt;&lt;P&gt;    module read_table_control.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;  module user_command_8000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IN SE38 &lt;/P&gt;&lt;P&gt;module status_8000 output.&lt;/P&gt;&lt;P&gt;  set pf-status 'XXXX'.&lt;/P&gt;&lt;P&gt;  set titlebar 'TITLE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  describe table i_tab lines lines.&lt;/P&gt;&lt;P&gt;  control-lines = lines + 10.&lt;/P&gt;&lt;P&gt;endmodule.                 " STATUS_8000  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module fill_table_control output.&lt;/P&gt;&lt;P&gt;  if sy-ucomm = 'ADD'.&lt;/P&gt;&lt;P&gt;    loop at screen.&lt;/P&gt;&lt;P&gt;      if flag is initial.&lt;/P&gt;&lt;P&gt;        screen-input = 0.&lt;/P&gt;&lt;P&gt;      elseif ( flag EQ 'Y' ).&lt;/P&gt;&lt;P&gt;        if  ( ( screen-name = 'I_ITAB-SNO' or&lt;/P&gt;&lt;P&gt;                screen-name = 'I_ITAB-SNAME' or&lt;/P&gt;&lt;P&gt;                screen-name = 'I_ITAB-SCITY' or&lt;/P&gt;&lt;P&gt;                screen-name = 'I_ITAB-SEDU' or&lt;/P&gt;&lt;P&gt;                screen-name = 'I_ITAB-SPERCENT' )&lt;/P&gt;&lt;P&gt;        and control-current_line LE lines ).&lt;/P&gt;&lt;P&gt;          screen-input = 1.&lt;/P&gt;&lt;P&gt;        else.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;      modify screen.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endmodule.                 " FILL_TABLE_CONTROL  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module user_command_8000 input.&lt;/P&gt;&lt;P&gt;  case sy-ucomm.&lt;/P&gt;&lt;P&gt; when 'ADD'.&lt;/P&gt;&lt;P&gt;      flag = 'Y'.&lt;/P&gt;&lt;P&gt;  endcase.&lt;/P&gt;&lt;P&gt;endmodule.                 " USER_COMMAND_8000  INPUT&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2009 08:33:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/input-enabling-in-table-control/m-p/5315681#M1225449</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-11T08:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Input Enabling in Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/input-enabling-in-table-control/m-p/5315682#M1225450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I made use of table control with wizard and it had all the required operations in that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 03:01:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/input-enabling-in-table-control/m-p/5315682#M1225450</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-12T03:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Input Enabling in Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/input-enabling-in-table-control/m-p/5315683#M1225451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To set input on or off in table control.&lt;/P&gt;&lt;P&gt;Suppose table contol u2013tabcon is made up of three fields,&lt;/P&gt;&lt;P&gt;ID 	NAME 	ADDRESS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u want to set  input on  or input off , of any field in the table  control,&lt;/P&gt;&lt;P&gt;e.g after clicking u2018oku2019 button u want to set input off of address field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to layout&lt;/P&gt;&lt;P&gt;Double click on address field in tabcon.&lt;/P&gt;&lt;P&gt;In its property make group1 = u2018080u2019.&lt;/P&gt;&lt;P&gt;Named it with three letters &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the flow screen,&lt;/P&gt;&lt;P&gt;After PBO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at TABCON.&lt;/P&gt;&lt;P&gt;	Module XYZ.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Double click on XYZ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Module XYZ output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Case sy-ucomm.&lt;/P&gt;&lt;P&gt;When u2018OKu2019.&lt;/P&gt;&lt;P&gt;Loop at screen.&lt;/P&gt;&lt;P&gt;CASE screen-group1.&lt;/P&gt;&lt;P&gt;WHEN '080'.	&lt;/P&gt;&lt;P&gt;   IF screen-name = 'ITAB-ADDRESSu2019.&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;Endcase.&lt;/P&gt;&lt;P&gt;Endcase.&lt;/P&gt;&lt;P&gt;Endmodule.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 14:48:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/input-enabling-in-table-control/m-p/5315683#M1225451</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T14:48:30Z</dc:date>
    </item>
  </channel>
</rss>

