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

tryint to use modify

Former Member
0 Likes
536

I am trying to use modify but my zzxmnga does not get updated but when i debug it has the correct value in it but doens't modify the record. Here is the code

LOOP AT T_ZOXED10166 INTO W_ZOXED10166.

wa_TABIX = SY-TABIX.

READ TABLE T3_ZOXED10166 INTO W3_ZOXED10166 WITH KEY

RUECK = W_ZOXED10166-RUECK

GRUND = W_ZOXED10166-GRUND.

IF SY-SUBRC = 0

AND W_ZOXED10166-GRUND+1(1) CP 'S'.

W3_ZOXED10166-ZZXMNGA = W_ZOXED10166-XMNGA + W3_ZOXED10166-XMNGA.

MODIFY T3_ZOXED10166 FROM W3_ZOXED10166 INDEX WA_TABIX.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
502

Try:

  IF sy-subrc = 0 AND
     w_zoxed10166-grund+1(1) EQ 'S'.         "<=== CP changed to EQ
    w3_zoxed10166-zzxmnga = w_zoxed10166-xmnga + w3_zoxed10166-xmnga.
    MODIFY t3_zoxed10166 FROM w3_zoxed10166 INDEX wa_tabix.

3 REPLIES 3
Read only

former_member214498
Contributor
0 Likes
502

Hi

Check the value of TABIX during the debugging whether the modify is working on the correct record or not.

moreover check the value of sy-subrc after the modify statement.

reward points, if helpful.

Read only

0 Likes
502

Yes i noticed that they are not matching. I've set it right after the loop so nto srue why it would not work

Read only

Former Member
0 Likes
503

Try:

  IF sy-subrc = 0 AND
     w_zoxed10166-grund+1(1) EQ 'S'.         "<=== CP changed to EQ
    w3_zoxed10166-zzxmnga = w_zoxed10166-xmnga + w3_zoxed10166-xmnga.
    MODIFY t3_zoxed10166 FROM w3_zoxed10166 INDEX wa_tabix.