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

Abnormal behaviour of a program

Former Member
0 Likes
817

I have written a report to calculate the trial balance of the G/L account codes entered by the user.The report is working fine but there is a strange problem i.e when i execute the report directly without putting the breakpoints it gives me incorrect total of the balances for few account codes and correct for few and also shows all balances as debit balances.But when i put a breakpoint and run the code by doing F6 the report gives perfect results.I do not make any change while debugging but still it gives me perfect answers whereas on direct execution it gives me incorrect answers.I m using field symbols to get the value of each column and then adding it.

I have written a report to calculate the trial balance of the G/L account codes entered by the user.The report is working fine but there is a strange problem i.e when i execute the report directly without putting the breakpoints it gives me incorrect total of the balances for few account codes and correct for few and also shows all balances as debit balances.But when i put a breakpoint and run the code by doing F6 the report gives perfect results.I do not make any change while debugging but still it gives me perfect answers whereas on direct execution it gives me incorrect answers.I m using field symbols to get the value of each column and then adding it.

6 REPLIES 6
Read only

Former Member
0 Likes
783

Hi Karishma,

Check if your report program has any updates on the database tables/ BDCs /BAPI calls. In such cass the updates may take some time. YOu are getting correct results in debug, as the debuggers issues a COMMIT statement for each F5/F6. You may have to use some commit work and wait statements whenever you call a bapi/ do a bdc or update a table.

Regards,

Ravi

Read only

0 Likes
783

Hi Ravi,

In my report there is no update in the database tables neither there are any BAPI calls.But still i have even used wait command and checked if still that is the reason.But nothing seems to work.

Read only

Former Member
0 Likes
783

Hi Karishma,

We've encountered a similar problem before. What we did was we put a WAIT UP TO 1 SECONDS syntax in the part of the code where it calculates amounts. Then it worked.

Hope this helps a bit.

Regards,

Cris

Read only

0 Likes
783

Hi Cris,

I have already tried using WAIT statement but it does not work even then.I dont know what seems to be the problem.

Read only

0 Likes
783

Hi Karishma,

I am sorry for that. Will it be ok if you post your code?

Regards,

Cris

Read only

0 Likes
783

Hi Karishma,

Put your code here. Let these experts have a look at it.