‎2007 Sep 12 10:14 PM
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.
‎2007 Sep 12 10:32 PM
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.
‎2007 Sep 12 10:27 PM
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.
‎2007 Sep 12 10:34 PM
Yes i noticed that they are not matching. I've set it right after the loop so nto srue why it would not work
‎2007 Sep 12 10:32 PM
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.