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

Update a table using MODIFY

Former Member
0 Likes
362

Hi,

We need your help.

We want to update a table using the MODIFY command but it does not delete the previous entries instead it INSERTs a new entry.

Scenario:

1. Upon calling the Screen for Editing the entry, the previous entry must be deleted

2. When SAVEd, the new entry must replace the previous entry.

1 ACCEPTED SOLUTION
Read only

0 Likes
343

Make sure that in the definition or your table you have specified the key. Otherwise, the system may "think" that all the fields are part of the key, therefore all lines are different.

This is a extract from SAP's documentation:

"The line to be changed is determined by the fact that the content of the table key matches the content of the corresponding components in the wa work area. For tables with a key that is not unique, the first entry that is found is changed. "

Regards.

1 REPLY 1
Read only

0 Likes
344

Make sure that in the definition or your table you have specified the key. Otherwise, the system may "think" that all the fields are part of the key, therefore all lines are different.

This is a extract from SAP's documentation:

"The line to be changed is determined by the fact that the content of the table key matches the content of the corresponding components in the wa work area. For tables with a key that is not unique, the first entry that is found is changed. "

Regards.