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: 

Update a table using MODIFY

Former Member
0 Kudos

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

0 Kudos

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

0 Kudos

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.