<?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 insert data into db table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-db-table/m-p/2167068#M459088</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi frends,&lt;/P&gt;&lt;P&gt;             i need to insert the data into the DB table. i am able to insert one one record. but when i try to insert another record ie another single row with only 2 fields different, its deleting my previous record and overwriting it. i could only insert one row at a time.pls guide me to slove my problm..thanx in advance..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 May 2007 21:52:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-08T21:52:59Z</dc:date>
    <item>
      <title>insert data into db table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-db-table/m-p/2167068#M459088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi frends,&lt;/P&gt;&lt;P&gt;             i need to insert the data into the DB table. i am able to insert one one record. but when i try to insert another record ie another single row with only 2 fields different, its deleting my previous record and overwriting it. i could only insert one row at a time.pls guide me to slove my problm..thanx in advance..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2007 21:52:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-db-table/m-p/2167068#M459088</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-08T21:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: insert data into db table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-db-table/m-p/2167069#M459089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi rahul,&lt;/P&gt;&lt;P&gt;   If you are trying to insert a new record with same key fields, then it will overwrite the old.&lt;/P&gt;&lt;P&gt;YOu have to pass a new key combination for the record.&lt;/P&gt;&lt;P&gt;Or you should use&lt;/P&gt;&lt;P&gt;accepting duplicate keys addition with the insert statement.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2007 21:56:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-db-table/m-p/2167069#M459089</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-08T21:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: insert data into db table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-db-table/m-p/2167070#M459090</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;  I believe you are using MODIFY statement to insert records..Because MODIFY will insert if there is no record for the key combination and INSERT record if there is a record for the key combination..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; So in your case...The key field values has to be different to create a new record in the table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2007 21:58:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-db-table/m-p/2167070#M459090</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-08T21:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: insert data into db table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-db-table/m-p/2167071#M459091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanx a lot for the solution. but i am using insert dbtable from table it_tab accepting duplicate entries. but still i could not enter the second record.for eg..&lt;/P&gt;&lt;P&gt;my first record is xxxx    yyyy    1111&lt;/P&gt;&lt;P&gt;second record is xxxx    yyyy    2222.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first time its inserting correctly but when i try to insert the second record its overwriting the first one.dont mind please go through my code..and help me please..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is my code...&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.&lt;/P&gt;&lt;P&gt;PARAMETER: USERROLE LIKE AGR_1251-AGR_NAME.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           ORGVALUE LIKE AGR_1251-FIELD.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS:  ORGVALUE FOR AGR_1251-FIELD,&lt;/P&gt;&lt;P&gt;                 LOWVAL FOR PT1252-LOW.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK B1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE '$' ORGVALUE-LOW INTO ORGVALUE.&lt;/P&gt;&lt;P&gt;  LOOP AT LOWVAL.&lt;/P&gt;&lt;P&gt;    ORGLEVELS-VARBL = ORGVALUE.&lt;/P&gt;&lt;P&gt;    ORGLEVELS-LOW = LOWVAL-LOW.&lt;/P&gt;&lt;P&gt;    ORGLEVELS-HIGH = LOWVAL-HIGH.&lt;/P&gt;&lt;P&gt;    APPEND ORGLEVELS.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;  BREAK NTHOTA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT ORGLEVELS.&lt;/P&gt;&lt;P&gt;    MAXCOUNTER = MAXCOUNTER + 1.&lt;/P&gt;&lt;P&gt;    MOVE-CORRESPONDING ORGLEVELS TO I_AGR_1252.&lt;/P&gt;&lt;P&gt;    I_AGR_1252-COUNTER  = MAXCOUNTER.&lt;/P&gt;&lt;P&gt;    I_AGR_1252-MANDT    = SY-MANDT.&lt;/P&gt;&lt;P&gt;    I_AGR_1252-AGR_NAME = USERROLE.&lt;/P&gt;&lt;P&gt;    APPEND I_AGR_1252.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      WRITE / 'no updates'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  BREAK-POINT.&lt;/P&gt;&lt;P&gt;  DELETE AGR_1252 FROM TABLE I_AGR_1252.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WRITE:/ 'deleted'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  INSERT AGR_1252 FROM TABLE I_AGR_1252 ACCEPTING DUPLICATE KEYS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; modify agr_1252 from table i_agr_1252.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;    WRITE:/ 'inserted'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR I_AGR_1252.&lt;/P&gt;&lt;P&gt;  REFRESH I_AGR_1252.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  COMMIT WORK.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2007 22:01:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-db-table/m-p/2167071#M459091</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-08T22:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: insert data into db table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-db-table/m-p/2167072#M459092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check in your DB table xxxx yyyy 1111 these fields should be primary key.&lt;/P&gt;&lt;P&gt;It seams that you have only xxxx yyyy fields defined as a primary key fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2007 22:50:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-db-table/m-p/2167072#M459092</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-08T22:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: insert data into db table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-db-table/m-p/2167073#M459093</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;I think you have defined only xxxx yyyy fields as primary key.&lt;/P&gt;&lt;P&gt;along with xxxx yyyy keep 1111 also a key field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if it is helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sangeetha.A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2007 04:11:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-db-table/m-p/2167073#M459093</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-09T04:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: insert data into db table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-db-table/m-p/2167074#M459094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rahul,&lt;/P&gt;&lt;P&gt;             If u r trying to insert a record with same primary key fields.&lt;/P&gt;&lt;P&gt;It will overwrite the record.&lt;/P&gt;&lt;P&gt;   I think ur first two field are primary fields.therefore no record will exists with same key fields.U make ur third field as primary field.then it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hemant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2007 04:34:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-db-table/m-p/2167074#M459094</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-09T04:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: insert data into db table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-db-table/m-p/2167075#M459095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Rahul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to insert record in the database table then you should be care ful with these things,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;you should table the primary keys as the reference for joining. i.e. you should have the rpimary keys populated in the internal table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;for modifying i.e. if you want to modify only with some fields then please use..&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify dbtable transporing that fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this will do for the datbase tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jayant &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please award if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2007 04:42:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-db-table/m-p/2167075#M459095</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-09T04:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: insert data into db table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-db-table/m-p/2167076#M459096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Rahul.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot enter the  data as you are saying , that way ... beacuse if you are having two key in the database table ... in you case the values caooespongding to that  field are 'XXX' and 'YYY'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can have only one value in the third field and if you try any other operation then it will definitely replace the old entry....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e. XXX  YYY 111&lt;/P&gt;&lt;P&gt;     XXX   YYY 222        ;   THIS THING IS NOT POSSIBLE KEEPING FIELDS FOR XXX AND YYY AS KEY FIELDS......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jayant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2007 04:48:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-db-table/m-p/2167076#M459096</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-09T04:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: insert data into db table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-db-table/m-p/2167077#M459097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i think u r inserting with same primary key value ,if u do so it will overwrite the first data .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2007 06:19:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-db-table/m-p/2167077#M459097</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-09T06:19:12Z</dc:date>
    </item>
  </channel>
</rss>

