Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

DELETE DUPLICATE ENTERIES WITH COMPARE TO TABLE CONTRL

Former Member
0 Kudos
79

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 .

2 REPLIES 2

Former Member
0 Kudos
49

are you using INSERT or MODIFY statement to update the database table

use MODIFY statement, i think you are using INSERT statement

Former Member
0 Kudos
49

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...