My program works in Debug mode only

Question:
I am having a peculiar problem. I have written program to exit out of IB11 screen, modify the field values based on some conditions and post it back on the screen using DYNP_UPDATE_FIELDS function module.
For some reason it only works when I run the program in Debug mode with watch point on the field.
Can some please help.
Thanks
Answer:
Is your program updating some DB tables!
Regards.
Answer:
Yes it is updating DB tables and it worked after I put Wait at the end of user exit.
I am now testing ofr any other side effects due to the Wait. Is this is a right to solve it?
Thanks.
Answer:
It depends.. should not be a problem here. Try COMMIT WORK AND WAIT. in place of just WAIT.

More Articles:

Problem - unable to come back to the ALV display?
Writing data to SQL Server from SAP using OLE?
Programming R/3 Logoff in ABAP Program?
Does anybody help me to solve this issue?
Table Control?
Max number of records in F4 value request?