2007 Jun 20 3:55 PM
HI ALL ,
I GOT A PROBLEM , THAT I AM SAVING DATA FROM TABLE CONTROL
INTO DDIC TABLE .
BUT IF THE SAME RECORD IS ALREADY EXISTING THEN IT IS GOING TO
DUMP .
SO HOW I COMPARE A TABLE CONTROL RECOD FROM DDIC TABLE
AND DELETE DUPLICATE ENTRIES .
2007 Jun 20 3:58 PM
are you using INSERT or MODIFY statement to update the database table
use MODIFY statement, i think you are using INSERT statement
2008 Apr 19 8:22 PM
Hey Fren,
Try this,
* To modify the DB table from work area
MODIFY <dbtab> FROM <wa>.
OR
To modify the DB table from Internal Table
MODIFY <dbtab> FROM TABLE <itab>.
The problem you are facing is due to the behaviour of the Database Uploading Statement.
Means INSERT, UPDATE and MODIFY are the three statements used to Change the Database Tables.
INSERT
It allows you to insert one or more lines into the database table target. You may specify the database table targeteither statically or dynamically.
For more information please visit,
[http://help.sap.com/saphelp_nw70/helpdata/EN/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm]
UPDATE
This statement allows you to change one or more lines in the database table target. As described in the section Inserting Table Lines, the database table target can be specified statically and dynamically.
For more information please visit,
[http://help.sap.com/saphelp_nw70/helpdata/EN/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm]
MODIFY
If the database table contains no line with the same primary key as the line to be inserted, MODIFY works like IINSERT - that is, the line is added.
If the database already contains a line with the same primary key as the line to be inserted, MODIFY works like UPDATE - that is, the line is changed.
For performance reasons, you should use MODIFY only if you really cannot distinguish between these two options in your program.
You can add or change one or more lines lines in a database table target. As described in the section Inserting Table Lines, the database table target can be specified statically and dynamically.
For more information please visit,
[http://help.sap.com/saphelp_nw70/helpdata/EN/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm]
Hope this helps you out,
Inspire if Needful,
Warm Regards,
Abhi...