Application Development and Automation 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: 
Read only

sentence Modify

Former Member
0 Likes
561

Hi guys , i have a small technical doubt , i want to update a Z table with some registers using modify , i dont have the key of the table only some fields , in some cases if the register already exits i want to modify the register but in some cases even if the register exits i want to add new registers, which one is the best way (optimal) to do that? , thank you guys.

1 ACCEPTED SOLUTION
Read only

former_member585060
Active Contributor
0 Likes
527

Use MODIFY statement, it does 2 operaions, both INSERT as well as UPDATE

If entry found with key, just update non key fields

If entry not found with key, it inserts new record.

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35eb358411d1829f0000e829fbfe/content.htm

Regards

Bala Krishna

4 REPLIES 4
Read only

Former Member
0 Likes
527

hi ,

If registers is only the Primary key ..

the if you want to add another record with registers already exist it will not allow, it will allow to modify.

If registers is one of the Primary key ..

the if you want to add another record with registers already exist it will to add or modify.

Regards,

Dass

Read only

0 Likes
527

Hi Prabhu,

Would like to share what registers are??

regards

sas

Read only

former_member156446
Active Contributor
0 Likes
527

hi how about hitting F1 on Modify statement in abap editor

Read only

former_member585060
Active Contributor
0 Likes
528

Use MODIFY statement, it does 2 operaions, both INSERT as well as UPDATE

If entry found with key, just update non key fields

If entry not found with key, it inserts new record.

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35eb358411d1829f0000e829fbfe/content.htm

Regards

Bala Krishna