<?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: table insert from itab in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-insert-from-itab/m-p/5484532#M1255403</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;       mblnr is not a key field,key fields are budat,matnr,mjahr and werks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Apr 2009 04:57:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-22T04:57:31Z</dc:date>
    <item>
      <title>table insert from itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-insert-from-itab/m-p/5484527#M1255398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   I have all datas in my itab.there are multiple mblnr in single date .but in my 'Z' table i am getting one mblnr.why multiple mblnrs are not inserted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; LOOP AT ITAB.

         IT_ZTPLSTOCK-MATNR = ITAB-MATNR_I.
         IT_ZTPLSTOCK-WERKS = ITAB-WERKS_I.
         IT_ZTPLSTOCK-MJAHR = ITAB-MJAHR.
         IT_ZTPLSTOCK-BUDAT = ITAB-BUDAT.
   
 IF ITAB-BWART_I = '101'.
      IT_ZTPLSTOCK-MENGE1 = ITAB-MENGE_I.
      IT_ZTPLSTOCK-MEINS1 = ITAB-MEINS_I.
      IT_ZTPLSTOCK-DMBTR1 = ITAB-DMBTR_I.
      IT_ZTPLSTOCK-BWART = ITAB-BWART_I.
      IT_ZTPLSTOCK-MBLNR = ITAB-MBLNR.
    
ELSEIF ITAB-BWART_I = '102'.
      IT_ZTPLSTOCK-MENGE1 = ITAB-MENGE_I.
      IT_ZTPLSTOCK-MEINS1 = ITAB-MEINS_I.
      IT_ZTPLSTOCK-DMBTR1 = ITAB-DMBTR_I.
      IT_ZTPLSTOCK-BWART = ITAB-BWART_I.
      IT_ZTPLSTOCK-MBLNR = ITAB-MBLNR.

    ELSEIF ITAB-BWART_I = '201'.
      IT_ZTPLSTOCK-MENGE2 = ITAB-MENGE_I.
      IT_ZTPLSTOCK-MEINS2 = ITAB-MEINS_I.
      IT_ZTPLSTOCK-DMBTR2 = ITAB-DMBTR_I.
      IT_ZTPLSTOCK-BWART = ITAB-BWART_I.
      IT_ZTPLSTOCK-MBLNR = ITAB-MBLNR.

    ELSEIF ITAB-BWART_I = '202'.
      IT_ZTPLSTOCK-MENGE2 = ITAB-MENGE_I.
      IT_ZTPLSTOCK-MEINS2 = ITAB-MEINS_I.
      IT_ZTPLSTOCK-DMBTR2 = ITAB-DMBTR_I.
      IT_ZTPLSTOCK-BWART = ITAB-BWART_I.
      IT_ZTPLSTOCK-MBLNR = ITAB-MBLNR.

    APPEND IT_ZTPLSTOCK.
    CLEAR IT_ZTPLSTOCK.
  ENDLOOP.
  LOOP AT IT_ztplstock.
    MOVE-CORRESPONDING IT_ztplstock TO ZTPLSTOCK.
    INSERT ZTPLSTOCK.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;suggest some ideas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with  regards,&lt;/P&gt;&lt;P&gt;Bathri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 04:51:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-insert-from-itab/m-p/5484527#M1255398</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-22T04:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: table insert from itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-insert-from-itab/m-p/5484528#M1255399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bathri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is that you MBLNR is the key field..if so..the INSERT will insert only one MBLNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to do the modify..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like belwo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data IT_ztplstock_final type table of ZTPLSTOCK.

  LOOP AT IT_ztplstock.
    MOVE-CORRESPONDING IT_ztplstock TO  IT_ztplstock_final 
    MODIFY ZTPLSTOCK from IT_ztplstock_final.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 04:55:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-insert-from-itab/m-p/5484528#M1255399</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-22T04:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: table insert from itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-insert-from-itab/m-p/5484529#M1255400</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 dependce on  what are the key fields u r using in u r ztable.check with manually entering the values in u r ztable if it accepting then u r program will wrok .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 04:55:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-insert-from-itab/m-p/5484529#M1255400</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-22T04:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: table insert from itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-insert-from-itab/m-p/5484530#M1255401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;mblnr  is the key field of the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use: &lt;STRONG&gt;Accepting Duplicate keys&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT IT_ztplstock.
    MOVE-CORRESPONDING IT_ztplstock TO ZTPLSTOCK.
    INSERT ZTPLSTOCK Accepting Duplicate keys.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gurpreet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 04:56:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-insert-from-itab/m-p/5484530#M1255401</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-22T04:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: table insert from itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-insert-from-itab/m-p/5484531#M1255402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear insted of writting this you could have done this &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;LOOP AT IT_ztplstock.
    MOVE-CORRESPONDING IT_ztplstock TO ZTPLSTOCK.
    INSERT ZTPLSTOCK.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to do this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;INSERT ZTPLSTOCK FROM TABLE IT_ztplstock.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and check your internal table at that time .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds ankit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 04:56:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-insert-from-itab/m-p/5484531#M1255402</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-22T04:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: table insert from itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-insert-from-itab/m-p/5484532#M1255403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;       mblnr is not a key field,key fields are budat,matnr,mjahr and werks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 04:57:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-insert-from-itab/m-p/5484532#M1255403</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-22T04:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: table insert from itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-insert-from-itab/m-p/5484533#M1255404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;and for creating a composite key you can also do insert serial number so that it would act as a primary key&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 04:58:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-insert-from-itab/m-p/5484533#M1255404</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-22T04:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: table insert from itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-insert-from-itab/m-p/5484534#M1255405</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;Please note that the key in DB table is unique. Hense your key should define a line item uniquely.&lt;/P&gt;&lt;P&gt;Looking at the key fields of your table, I feel it is incomplete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can have several documents of same material, plant and date combination. &lt;/P&gt;&lt;P&gt;I think you should add document number i.e MBLNR to the key combination in your Z-Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;RJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 05:03:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-insert-from-itab/m-p/5484534#M1255405</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-22T05:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: table insert from itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-insert-from-itab/m-p/5484535#M1255406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LOOP AT IT_ztplstock.&lt;/P&gt;&lt;P&gt;    MOVE-CORRESPONDING IT_ztplstock TO ZTPLSTOCK.&lt;/P&gt;&lt;P&gt;    INSERT ZTPLSTOCK.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;instead of this u can use like the below one&lt;/P&gt;&lt;P&gt;  LOOP AT IT_ztplstock.&lt;/P&gt;&lt;P&gt;    MOVE-CORRESPONDING IT_ztplstock TO ZTPLSTOCK.&lt;/P&gt;&lt;P&gt;modify ztplstock from it_ztplstock with key mblnr&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 05:28:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-insert-from-itab/m-p/5484535#M1255406</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-22T05:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: table insert from itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-insert-from-itab/m-p/5484536#M1255407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;     thanks i put mblnr as key field its working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Bathri..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 05:28:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-insert-from-itab/m-p/5484536#M1255407</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-22T05:28:48Z</dc:date>
    </item>
  </channel>
</rss>

