<?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: Regarding Insert statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-statement/m-p/3473377#M834884</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , &lt;/P&gt;&lt;P&gt; In the work area you are using to insert data into the table assign the value of the client i.e the field MANDT .&lt;/P&gt;&lt;P&gt;Once you assign the value to client your statement must work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Feb 2008 10:26:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-29T10:26:48Z</dc:date>
    <item>
      <title>Regarding Insert statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-statement/m-p/3473374#M834881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Can you please tell me what is the wrong in below INSERT satement.&lt;/P&gt;&lt;P&gt;Its giving as "FAILED".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : It_vbrp type standard table of vbrp with header line,&lt;/P&gt;&lt;P&gt;       it_vbak type standard table of vbak with header line,&lt;/P&gt;&lt;P&gt;       it_vbap type standard table of vbap with header line,&lt;/P&gt;&lt;P&gt;       wa_vbak type vbak,&lt;/P&gt;&lt;P&gt;       wa_vbap type vbap.&lt;/P&gt;&lt;P&gt;       &lt;/P&gt;&lt;P&gt;wa_vbak-vbeln = '0090005178'.  &lt;/P&gt;&lt;P&gt;insert into vbak values wa_vbak.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;write : 'failed'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'success'.&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;Regards&lt;/P&gt;&lt;P&gt;Sandeep Reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 10:18:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-statement/m-p/3473374#M834881</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T10:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Insert statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-statement/m-p/3473375#M834882</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;INSERT for Database Tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inserts entries from database tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT &amp;lt;dbtab&amp;gt; FROM &amp;lt;wa&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT &amp;lt;dbtab&amp;gt; FROM TABLE &amp;lt;itab&amp;gt; [ACCEPTING DUPLICATE KEYS].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inserts one line from the work area &amp;lt;wa&amp;gt; or several lines from the internal table &amp;lt;itab&amp;gt; into the database table &amp;lt;dbtab&amp;gt;. The ACCEPTING DUPLICATE KEYS addition prevents a runtime error from occurring if two entries have the same primary key. Instead, it merely discards the duplicate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT for Field Groups&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defines the structure of field groups for extract datasets. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT &amp;lt;f1&amp;gt;... &amp;lt;f n&amp;gt; INTO &amp;lt;fg&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Includes the fields &amp;lt;fi&amp;gt; in the field group &amp;lt;fg&amp;gt;, thus defining a line structure for an extract dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT for any Internal Table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inserts lines from internal tables of any type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT &amp;lt;line&amp;gt;|LINES OF &amp;lt;jtab&amp;gt; [FROM &amp;lt;n1&amp;gt;] [TO &amp;lt;n 2&amp;gt;] &lt;/P&gt;&lt;P&gt;       INTO TABLE &amp;lt;itab&amp;gt;&lt;/P&gt;&lt;P&gt;       [ASSIGNING &amp;lt;FS&amp;gt; | REFERENCE INTO &amp;lt;dref&amp;gt;].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inserts a line &amp;lt;line&amp;gt; or a set of lines from the internal table &amp;lt;jtab&amp;gt; into the internal table &amp;lt;itab&amp;gt;. If &amp;lt;jtab&amp;gt; is an index table, you can use the FROM and TO additions to restrict the lines inserted. If you use ASSIGNING or INTO REFERENCE, field symbol &amp;lt;FS&amp;gt; refers to the inserted line or the relevant data reference is stored in &amp;lt;dref&amp;gt; after the statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT for Index Tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inserts entries in index tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT &amp;lt;line&amp;gt;|LINES OF &amp;lt;jtab&amp;gt; [FROM &amp;lt;n1&amp;gt;] [TO &amp;lt;n 2&amp;gt;] &lt;/P&gt;&lt;P&gt;  INTO &amp;lt;itab&amp;gt; [INDEX &amp;lt;idx&amp;gt;]&lt;/P&gt;&lt;P&gt;  [ASSIGNING &amp;lt;FS&amp;gt; | REFERENCE INTO &amp;lt;dref&amp;gt;].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inserts a line &amp;lt;line&amp;gt; or a set of lines from the internal table &amp;lt;jtab&amp;gt; into the internal table &amp;lt;itab&amp;gt;before the line with the index &amp;lt;idx&amp;gt;. If &amp;lt;jtab&amp;gt; is an index table, you can use the FROM and TO additions to restrict the lines inserted. If you omit the INDEX addition, you can only use the statement within a LOOP. A new line containing values is inserted before the current line. If you use ASSIGNING or INTO REFERENCE, field symbol &amp;lt;FS&amp;gt; refers to the inserted line or the relevant data reference is stored in &amp;lt;dref&amp;gt; after the statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Priya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 10:22:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-statement/m-p/3473375#M834882</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T10:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Insert statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-statement/m-p/3473376#M834883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi check example ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: int  TYPE i, &lt;/P&gt;&lt;P&gt;      dref TYPE REF TO i. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: int_tab LIKE STANDARD TABLE OF int, &lt;/P&gt;&lt;P&gt;      ref_tab LIKE HASHED TABLE OF dref &lt;/P&gt;&lt;P&gt;              WITH UNIQUE KEY table_line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 10 TIMES. &lt;/P&gt;&lt;P&gt;  INSERT sy-index &lt;/P&gt;&lt;P&gt;         INTO int_tab INDEX 1 &lt;/P&gt;&lt;P&gt;         REFERENCE INTO dref. &lt;/P&gt;&lt;P&gt;  INSERT dref &lt;/P&gt;&lt;P&gt;         INTO TABLE ref_tab. &lt;/P&gt;&lt;P&gt;ENDDO. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT int_tab INTO int. &lt;/P&gt;&lt;P&gt;  WRITE / int. &lt;/P&gt;&lt;P&gt;ENDLOOP. &lt;/P&gt;&lt;P&gt;SKIP. &lt;/P&gt;&lt;P&gt;LOOP AT ref_tab INTO dref. &lt;/P&gt;&lt;P&gt;  WRITE / dref-&amp;gt;*. &lt;/P&gt;&lt;P&gt;ENDLOOP. &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;venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 10:24:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-statement/m-p/3473376#M834883</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T10:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Insert statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-statement/m-p/3473377#M834884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , &lt;/P&gt;&lt;P&gt; In the work area you are using to insert data into the table assign the value of the client i.e the field MANDT .&lt;/P&gt;&lt;P&gt;Once you assign the value to client your statement must work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 10:26:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-statement/m-p/3473377#M834884</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T10:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Insert statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-statement/m-p/3473378#M834885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please check your VBAK table whether an entry already exist with this number. If no then it should work perfectly. If yes then we cant insert data into any table with same key. Also specification of Clint field is optional.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 10:33:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-statement/m-p/3473378#M834885</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2008-02-29T10:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Insert statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-statement/m-p/3473379#M834886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;do like this u will get the output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : It_vbrp type standard table of vbrp with header line,&lt;/P&gt;&lt;P&gt;it_vbak type standard table of vbak with header line,&lt;/P&gt;&lt;P&gt;it_vbap type standard table of vbap with header line,&lt;/P&gt;&lt;P&gt;wa_vbak type vbak,&lt;/P&gt;&lt;P&gt;wa_vbap type vbap.&lt;/P&gt;&lt;P&gt;wa_vbak-vbeln = '0090005178'.&lt;/P&gt;&lt;P&gt;INSERT INTO vbak CLIENT SPECIFIED values wa_vbak .&lt;/P&gt;&lt;P&gt; if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;write : 'failed'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'success'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;note: dont insert the same record.it will give failed message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To specify the database table statically, enter the following for &amp;lt;target&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT INTO &amp;lt;dbtab&amp;gt; [CLIENT SPECIFIED] &amp;lt;lines&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where &amp;lt;dbtab&amp;gt; is the name of a database table defined in the ABAP Dictionary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To specify the database table dynamically, enter the following for &amp;lt;target&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT INTO (&amp;lt;name&amp;gt;) [CLIENT SPECIFIED] &amp;lt;lines&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where the field &amp;lt;name&amp;gt; contains the name of a database table defined in the ABAP Dictionary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the CLIENT SPECIFIED addition to disable automatic client handling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jyothsna M on Feb 29, 2008 12:07 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 11:03:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-statement/m-p/3473379#M834886</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T11:03:19Z</dc:date>
    </item>
  </channel>
</rss>

