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

MODIFY and DELETE statement does not work...

aris_hidalgo
Contributor
0 Likes
946

Hello Experts,

I am encountering a problem when using the MODIFY and DELETE statement in my

program because it seems that it does not work when I run the program. But if I check it in

debugging mode, it works. Below is my code:


LOOP AT lcl_data_def=>gt_zsalesorder ASSIGNING <fs_zsalesorder>.
      CALL FUNCTION 'ZSD_UPDATE_SO_PRICINGTYPE' DESTINATION lcl_data_def=>gv_destination
        EXPORTING
          im_vbeln   = <fs_zsalesorder>-object_id
        IMPORTING
          ex_icon    = lcl_data_def=>wa_status-icon
          ex_status  = lcl_data_def=>wa_status-status
          ex_message = lcl_data_def=>wa_status-message.

      APPEND lcl_data_def=>wa_status TO lcl_data_def=>gt_status.

      IF lcl_data_def=>wa_status-status = lc_s.
        <fs_zsalesorder>-flag = 'X'.
        MODIFY zsalesorder FROM <fs_zsalesorder>.
        COMMIT WORK AND WAIT.
      ENDIF.
      CLEAR lcl_data_def=>wa_status.
    ENDLOOP.
    DELETE zsalesorder FROM TABLE lcl_data_def=>gt_zsalesorder.
    COMMIT WORK AND WAIT.

Hope you can help me guys. Thank you and take care!

1 ACCEPTED SOLUTION
Read only

former_member188827
Active Contributor
0 Likes
920

try removing and wait addition from comit work statement abnd see if it works

7 REPLIES 7
Read only

former_member188827
Active Contributor
0 Likes
921

try removing and wait addition from comit work statement abnd see if it works

Read only

0 Likes
920

Hi,

I removed the AND WAIT addition and it still does not work.

Read only

former_member188827
Active Contributor
0 Likes
920

wat is the return code after modify statement in debugging and also after commit?

Read only

0 Likes
920

Hi,

the value is '0'.

Thanks!

Read only

0 Likes
920

this means dis is working...wat is actually happening? wen u check ur table zsalesorder in se11 does entry still exits after delete statement...

Read only

0 Likes
920

Yup.

Read only

Former Member
0 Likes
920

please close your execution screen after execution and check in se11 (or)

goto to the pgmscreen from execution screen and then check in se11