<?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: trans data in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/trans-data/m-p/3068839#M727309</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;      use modify or insert statment&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify ZZVBAK from table it_ZZVBAK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZZVBAK -&amp;gt; DATABASE table name&lt;/P&gt;&lt;P&gt;IT_ZZVBAK -&amp;gt; ur internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Niyaz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Nov 2007 05:14:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-16T05:14:07Z</dc:date>
    <item>
      <title>trans data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trans-data/m-p/3068838#M727308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how to tranasfer data from internal table to database table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 05:12:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trans-data/m-p/3068838#M727308</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T05:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: trans data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trans-data/m-p/3068839#M727309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;      use modify or insert statment&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify ZZVBAK from table it_ZZVBAK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZZVBAK -&amp;gt; DATABASE table name&lt;/P&gt;&lt;P&gt;IT_ZZVBAK -&amp;gt; ur internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Niyaz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 05:14:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trans-data/m-p/3068839#M727309</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T05:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: trans data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trans-data/m-p/3068840#M727310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;INSERT - itab_position &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax &lt;/P&gt;&lt;P&gt;... {TABLE itab} &lt;/P&gt;&lt;P&gt;  | {itab [INDEX idx]} ... . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatives: &lt;/P&gt;&lt;P&gt;1. ... TABLE itab &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. ... itab INDEX idx &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;These alternatives specify at which position of the internal table itab lines are to be inserted. If you use the option with the addition TABLE, the position at which the line is inserted, is specified using the table key. If you use the option with the addition INDEX, the table index is used for the specification. The latter option can only be used for index tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternative 1 &lt;/P&gt;&lt;P&gt;... TABLE itab &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;Effect &lt;/P&gt;&lt;P&gt;The lines line_spec to be inserted must be compatible with the line type of the internal table. Depending on the table type, each line is inserted as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For standard tables, each new line is appended as the last line in the internal table regardless of the table key. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For sorted tables, each new line is inserted into the sort order of the internal table according to its key values and the table index of the following lines is increased by one. If the internal table does not have a unique key, duplicate entries are inserted before the existing line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For hashed tables, each new line is inserted into the internal table by the hash adminstration according to its key values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the internal table has a unique key, duplicate entries are not inserted. When inserting single lines, sy-subrc is set to 4. When inserting multiple lines, an exception that cannot be handled is triggered. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Filling an internal table connection_tab with data of the database table spfli. Single lines are inserted using the table key and are filled with the content of the work area connection. Since the internal table has a unique key, duplicate entries are rejected. The better performing SELECT statement for which the internal table is specified directly after INTO TABLE could raise an exception due to the uniqueness of the table key. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF connection, &lt;/P&gt;&lt;P&gt;        cityfrom TYPE spfli-cityfrom, &lt;/P&gt;&lt;P&gt;        cityto   TYPE spfli-cityto, &lt;/P&gt;&lt;P&gt;        distid   TYPE spfli-distid, &lt;/P&gt;&lt;P&gt;        distance TYPE spfli-distance, &lt;/P&gt;&lt;P&gt;      END OF connection. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA connection_tab LIKE SORTED TABLE OF connection &lt;/P&gt;&lt;P&gt;                    WITH UNIQUE KEY cityfrom cityto &lt;/P&gt;&lt;P&gt;                                    distid distance. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT cityfrom cityto distid distance &lt;/P&gt;&lt;P&gt;       FROM spfli &lt;/P&gt;&lt;P&gt;       INTO connection. &lt;/P&gt;&lt;P&gt;  INSERT connection INTO TABLE connection_tab. &lt;/P&gt;&lt;P&gt;ENDSELECT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternative 2 &lt;/P&gt;&lt;P&gt;... itab INDEX idx &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;Effect &lt;/P&gt;&lt;P&gt;This variant can only be used for standard tables and sorted tables. Each line line_spec to be inserted into the line before the table index idx and the table index of the following lines is increased by one. A data object of the type i is expected for idx. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If idx contains a value equal to the number of the existing table lines plus one, the new line is appended as the last line in the internal table. If idx contains a greater value, no line is inserted and sy-subrc is set to 4. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An exception that cannot be handled is raised when: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;idx contains a value less than or equal to 0 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A line to be inserted would cause a duplicate entry in tables with a unique table key &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A line to be inserted would disrupt the sort order of sorted tables &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within a LOOP loop, you can omit the addition INDEX. Each line to be inserted is inserted before the current table line of the LOOP loop. However, if the current line is deleted in the same loop pass, the response is undefined. &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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT - line_spec &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax &lt;/P&gt;&lt;P&gt;... &lt;SPAN __jive_macro_name="wa"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;  | {INITIAL LINE} &lt;/P&gt;&lt;P&gt;  | {LINES OF jtab [FROM idx1] [TO idx2]} ... . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatives: &lt;/P&gt;&lt;P&gt;1. ... wa &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. ... INITIAL LINE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. ... LINES OF jtab [FROM idx1] [TO idx2] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;You can insert a work area wa, an initial line INITIAL LINE or multiple lines of an internal table jtab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternative 1 &lt;/P&gt;&lt;P&gt;... wa &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;Effect &lt;/P&gt;&lt;P&gt;A new line is generated and filled with the content of the work area wa. wa must be compatible with the line type of the internal table when you insert the lines or work area using the table key. When you insert the lines or work area using the table index, wa can be incompatible with the line type of the internal table and may be converted to the line type according to the conversion rules, if necessary. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;Outside of classes, you can omit the specification of wa INTO if the internal table contains a header line itab with the same name. In this case, the statement implicitly uses the header line as the work area. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternative 2 &lt;/P&gt;&lt;P&gt;... INITIAL LINE &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;Effect &lt;/P&gt;&lt;P&gt;A new line is inserted in which each component contains the type-specific initial value from the table of value ranges of built-in ABAP types. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternative 3 &lt;/P&gt;&lt;P&gt;... LINES OF jtab [FROM idx1] [TO idx2] &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;Effect &lt;/P&gt;&lt;P&gt;The lines of an internal table jtab are inserted one after another according to the same rules as for the insertion of a work area. The line types of itab and jtab must be compatible. If jtab is an index table, you can specify FROM idx1 and TO idx2 to restrict the lines to be inserted. In this case, only the table lines from the table idx1 onward and/or up to the table index idx2 are inserted from jtab. Data objects of the type i are expected for idx1 and idx2. If idx1 or idx2 is less than or equal to 0, an exception that cannot be handled is raised. If idx1 is greater than idx2 or greater than the number of table lines, no lines are inserted. If idx2 is greater than the number of table lines, it is set to the number of table lines. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;If a conflict with an already existing unique table key occurs, an exception that cannot be handled is caused when inserting multiple lines from an internal table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 05:15:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trans-data/m-p/3068840#M727310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T05:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: trans data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trans-data/m-p/3068841#M727311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS: p_carrid TYPE sflight-carrid, 
            percent(1) TYPE p DECIMALS 0. 

DATA sflight_tab TYPE TABLE OF sflight. 
FIELD-SYMBOLS &amp;lt;sflight&amp;gt; TYPE sflight. 

SELECT * 
       FROM sflight 
       INTO TABLE sflight_tab 
       WHERE carrid = p_carrid AND 
             fldate = sy-datum. 

IF sy-subrc = 0. 
  LOOP AT sflight_tab ASSIGNING &amp;lt;sflight&amp;gt;. 
    &amp;lt;sflight&amp;gt;-price = 
      &amp;lt;sflight&amp;gt;-price * ( 1 - percent / 100 ). 
  ENDLOOP. 
ENDIF. 

UPDATE sflight FROM TABLE sflight_tab. &lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 05:15:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trans-data/m-p/3068841#M727311</guid>
      <dc:creator>former_member189059</dc:creator>
      <dc:date>2007-11-16T05:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: trans data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trans-data/m-p/3068842#M727312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WIth MODIFY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODIFY ZTABLE FROM TABLE  ITAB.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here ITAB should be like same with the ZTABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WIth the INSERT command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Loop at itab.
  move correspoding itab to ZTABLE.
  INSERT ZTABLE.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to do &amp;lt;b&amp;gt;COMMIT WORK.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 05:16:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trans-data/m-p/3068842#M727312</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2007-11-16T05:16:01Z</dc:date>
    </item>
  </channel>
</rss>

