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: 

Data is overwritting in database

former_member659396
Participant
0 Kudos

Dear friends

I am saving data in database table through screen.but problem is that it should allow duplicate entry

without overwriting,

wa_ordtyp-txt = T003p-AUART.

WA_ORDTYP-AUART = T003P-AUART.

WA_ORDTYP-ZRD_FIELD = ZRD_FIELD.

WA_ORDTYP-ZRD_FLHDR = ZRD_FLHDR.

WA_ORDTYP-ZRB_SLB_PARA1 = ZRB_SLB_PARA1.

WA_ORDTYP-ZRB_SLB_PARA2 = ZRB_SLB_PARA2.

WA_ORDTYP-ZRB_SLB_PARA3 = ZRB_SLB_PARA3.

WA_ORDTYP-ZRB_SLB_PARA4 = ZRB_SLB_PARA4.

WA_ORDTYP-ZRB_CLSS = ZRB_CLSS.

MODIFY ZRD_ORDTYP FROM WA_ORDTYP.

clear wa.

13 REPLIES 13

Former Member
0 Kudos

Hi,

The MODIFY statement inserts one or several lines specified in source in the database table specified in target if those records does not exist in DB, or overwrites existing lines.

Former Member
0 Kudos

Hi,

I don't get your problem. Why do you want duplicate entries in a database table?

Best regards,

Alex.

Former Member
0 Kudos

Hello Pramod,

i think in your data base table the relation between the field is in composite PRIMARY KEY.

composite primary key can be in realtion of two field or more than two field.

the concept of composite primary key is. it check the record with whole primary key Example if you have a three key together in your data base table.than it will compare all three key.if he find any value different in any of the three field than it will allow to enter new record.instead of modifying.

so check your data base table .

hope it will help you to make your concept again.

Thanks

-Arun kayal

0 Kudos

hi arun

can u tel me the solution for the same as AUART is my key field in this

please help me.

regards

Rohan

0 Kudos

Hello.

You can research with the type of data that you are going to have in your table and then should deciede how many key fields you need to have to have such kind of data.

In your case you can have more than 1 key field if you want to maintain number of entries for same AUART or you should not have any key field at all.

Hope it helps.

Thanks,

Jayant Sahu.

Former Member
0 Kudos

Instead of MODIFY , you can use UPDATE to insert tha data in databse table.

UPDATE will add duplicate entries in table but MODIFY will not.

Regards,

Anuja dhondge

matt
Active Contributor
0 Kudos

>

> UPDATE will add duplicate entries in table but MODIFY will not.

No, it won't.

0 Kudos

UPDATE will add duplicate entries in table

Absolute nonsense!

0 Kudos

UPDATE will add duplicate entries in table

Absolute nonsense!

JozsefSzikszai
Active Contributor
0 Kudos

>

> I am saving data in database table through screen.but problem is that it should allow duplicate entry

> without overwriting,

According to the design of relational databases (i. e. primary keys), this is not possible at all

Former Member
0 Kudos

UPDATE will just ignore,but will not add duplicates..

kamesh_g
Contributor
0 Kudos

ITS not advisable to use modify for standard tables ..

its better to use UPDATE or INSERT ...

former_member659396
Participant
0 Kudos

dv