Application Development 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: 

Sapscript results unpredictable, help asap please.

Former Member
0 Kudos
88

Hi. I am using main window to print detail lines. All calculated numbers are correct, except sometimes the same data will produce different results. Same run information, output type, etc. We documented 2 different results can happen from same exact run information. Any ideas what to look out for or had similar experience? Driving me crazy! Will need to re-write alot if can't get help, thanks.

1 ACCEPTED SOLUTION

former_member192429
Active Participant
0 Kudos
62

Since all your details come from Driver program it is better to concentrate on the program. Put a debug at Open_form and check whether the field values which are causing the problem, are properly initialized.

-Kriss

6 REPLIES 6

alejandro_bindi
Active Contributor
0 Kudos
62

Please provide further details.

Which columns produce different data?

former_member192429
Active Participant
0 Kudos
63

Since all your details come from Driver program it is better to concentrate on the program. Put a debug at Open_form and check whether the field values which are causing the problem, are properly initialized.

-Kriss

Former Member
0 Kudos
62

I am maintaining a program. There is a column that is in a variable for spec weight of an internal formula. I think I need to concentrate on the main program which determines the values first. The very strange part is that it is unpredictable, somtimes values in debugger correct, others not. Thought sapscript might have had something to do with it. Usually, same data, same logic, same output. We are in 46b client. User printed bad copies, called me, and we saw good data in print preview. After several runs, I got the same bad data in print preview. I will most likely re-write the routine, just looking for some insight that others might have.

0 Kudos
62

Hi,

A simple hint, in the driver program whether variables and work areas, header lines are cleared properly within loop and outside? check for memory variables you are importing using IMPORT MEMORY id .... if anything clear properly

aRs

Former Member
0 Kudos
62

Thank you all for your helpful suggestions. A rewrite was in order for this code.

Former Member
0 Kudos
62

Update: All variables, int tables, accumulators, need to be refreshed because ABAP memory will retain values between runs in print preview, etc., this was the solution.