<?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: Insertion in Table Control in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/insertion-in-table-control/m-p/4409052#M1047751</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;it's possible to insert a row in a table control and making changes. in which case do you want to insert a row can you elaborate?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sathish Reddy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Sep 2008 07:01:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-17T07:01:09Z</dc:date>
    <item>
      <title>Insertion in Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insertion-in-table-control/m-p/4409051#M1047750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             Is it possible to insert a row in Table control.&lt;/P&gt;&lt;P&gt;Whatever the row is selected in table control, that row should &lt;/P&gt;&lt;P&gt;be in editable mode and user will insert data into it and then &lt;/P&gt;&lt;P&gt;he will save data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please let me know regarding this.&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;S.Anilkumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 06:54:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insertion-in-table-control/m-p/4409051#M1047750</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T06:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Insertion in Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insertion-in-table-control/m-p/4409052#M1047751</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;it's possible to insert a row in a table control and making changes. in which case do you want to insert a row can you elaborate?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sathish Reddy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 07:01:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insertion-in-table-control/m-p/4409052#M1047751</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T07:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Insertion in Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insertion-in-table-control/m-p/4409053#M1047752</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;Is it possible to insert a row in Table control.: Yes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whatever the row is selected in table control, that row should &lt;/P&gt;&lt;P&gt;be in editable mode and user will insert data into it and then &lt;/P&gt;&lt;P&gt;he will save data: plz look into below example :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.

DATA: ok_code TYPE sy-ucomm,
save_ok TYPE sy-ucomm.

DATA: itab TYPE TABLE OF demo_conn,
fill TYPE i.
TABLES demo_conn.

DATA: lines TYPE i,
limit TYPE i.

SELECT * FROM spfli INTO TABLE itab.

CALL SCREEN 100.

MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN_100'.
DESCRIBE TABLE itab LINES fill.
flights-lines = fill.
ENDMODULE.

MODULE fill_table_control OUTPUT.
READ TABLE itab INTO demo_conn INDEX flights-current_line.
ENDMODULE.

MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE.

MODULE read_table_control INPUT.
lines = sy-loopc.
MODIFY itab FROM demo_conn INDEX flights-current_line.
ENDMODULE.

MODULE user_command_0100 INPUT.
save_ok = ok_code.
CLEAR ok_code.
CASE save_ok.
WHEN 'SAVE'.
INSERT &amp;lt;DataBASEtable&amp;gt; FROM TABLE itab ACCEPTING DUPLICATE KEYS. 

(or)

Modify &amp;lt;DataBASEtable&amp;gt; from table itab. 
ENDCASE.
ENDMODULE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note:- here u can insert data into table control, then u can copying the data in table control into itab, then modify or insert database table from this itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And also u can insert or modify database table for selected entries in table control by adding a field(FLAG) of type character and length 1 and according to if this fields value(FLAG) = 'X' then insert into database table .... also.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 07:05:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insertion-in-table-control/m-p/4409053#M1047752</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T07:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: Insertion in Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insertion-in-table-control/m-p/4409054#M1047753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to insert a row in Table control.&lt;/P&gt;&lt;P&gt;Whatever the row is selected in table control, that row should&lt;/P&gt;&lt;P&gt;be in editable mode and user will insert data into it and then&lt;/P&gt;&lt;P&gt;he will save data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please let me know regarding this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;S.Anilkumar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is possible to add row in a table control. During PAI, whenever you are looping with the table control, you can append a row to it.And then during PBO, you write DESCRIBE IT LINES TC-LINES to populate table control with the newest lines.The row is automatically in editable mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Editable,&lt;/P&gt;&lt;P&gt;Whenever user selects a row, in PBO looping with control, you get the current index of the table which is selected using GET CURSOR statement. And on that line, you do LOOP AT SCREEN and ENDSCREEN with screen-input = 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 07:06:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insertion-in-table-control/m-p/4409054#M1047753</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T07:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Insertion in Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insertion-in-table-control/m-p/4409055#M1047754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Satharupa,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the following module to include a blank line in your Table when the use presses the ADD button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE add_line INPUT.&lt;/P&gt;&lt;P&gt;  CASE ok_code2.&lt;/P&gt;&lt;P&gt;    WHEN 'ADD'.&lt;/P&gt;&lt;P&gt;*Appending an empty line to add a line in table control.&lt;/P&gt;&lt;P&gt;      APPEND  INITIAL  LINE TO itab.&lt;/P&gt;&lt;P&gt;      CLEAR ok_code2.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " add_line  INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After this you can update the line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 07:08:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insertion-in-table-control/m-p/4409055#M1047754</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T07:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Insertion in Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insertion-in-table-control/m-p/4409056#M1047755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;              For example 10 records are displayed in&lt;/P&gt;&lt;P&gt;table control.&lt;/P&gt;&lt;P&gt;when  user select 5th record and press insert button, then &lt;/P&gt;&lt;P&gt;new empty editable  row should be inserted for all fields in table control,sothat user can insert the data into all fields for this row and press save button .In this case, 5th record is going to move to 6th row in table control since we are adding empty row in 5 th row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont need logic for modifying the table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want exactly this requirement.&lt;/P&gt;&lt;P&gt;&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;S.ANILKUMAR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 07:16:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insertion-in-table-control/m-p/4409056#M1047755</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T07:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Insertion in Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insertion-in-table-control/m-p/4409057#M1047756</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  like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;case ok_code.
when 'INSERT'.
if v_index is not initial.
        describe table itab lines v_index.
        v_index = v_index + 1.
        tc-current_line = tc-current_line + 1.
        v_index = tc-current_line.
        insert initial line into itab index v_index.
      else.
        get cursor line  v_line.
        move : v_line to v_index.
        v_index = v_index + 1.
        insert initial line into itab index v_index.
      endif.
      tc-lines = v_lines + 1.
ENDCASE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sathish Reddy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 07:27:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insertion-in-table-control/m-p/4409057#M1047756</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T07:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Insertion in Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insertion-in-table-control/m-p/4409058#M1047757</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  like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;case ok_code.
when 'INSERT'.
if v_index is not initial.
        describe table itab lines v_index.
        v_index = v_index + 1.
        tc-current_line = tc-current_line + 1.
        v_index = tc-current_line.
        insert initial line into itab index v_index.
      else.
        get cursor line  v_line.
        move : v_line to v_index.
        v_index = v_index + 1.
        insert initial line into itab index v_index.
      endif.
      tc-lines = v_lines + 1.
ENDCASE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sathish Reddy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 07:27:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insertion-in-table-control/m-p/4409058#M1047757</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T07:27:50Z</dc:date>
    </item>
  </channel>
</rss>

