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 Command is not working.

Former Member
0 Kudos

Hi,

There are 15 fields in the database table. The first 5 fields are set as primary keys. In the table, only the first field has got unique values. In the next 4 primary keys the values are getting repeated.

Now, i am trying to modify the 10th field using Update Command.

I have written the below command.

Updated ZOMT_PROCESS using WL_INITIAL_VALUES.

The record is not getting modified in the database table with the values of the work area WL_INITIAL_VALUES.

What could be the problem?

5 REPLIES 5

matt
Active Contributor
0 Kudos

You've forgotten to commit?

ThomasZloch
Active Contributor
0 Kudos

what is the value of SY-SUBRC immediately after the UPDATE? If 4 and not 0, then there is something wrong in your work area.

Thomas

former_member585060
Active Contributor
0 Kudos

Hi,

Move all the modifiable work area fields to an Internal table and modify the ztable.

Use the following syntax

LOOP AT i_selected_rows INTO w_selected_rows.

READ TABLE itab INTO wa INDEX w_selected_rows-index.

IF sy-subrc EQ 0.

MOVE-CORRESPONDING wa TO w_modified.

APPEND w_modified TO i_modified.

ENDIF.

ENDLOOP.

MODIFY zzzmaterial FROM TABLE i_modified.

Regards

Bala Krishna

GeraldP
Explorer
0 Kudos

Could you please send your complete Sourcecode.

Otherwise we can only imagine your problem.

Thanks

Gerald

GeraldP
Explorer
0 Kudos

Could you please send your complete Sourcecode.

Otherwise we can only imagine your problem.

Thanks

Gerald