Showing results for 
Search instead for 
Did you mean: 

Doubled records after logic execution

Former Member
0 Kudos

Hi all,

I am experiencing strange behaviour in a logic file. What happens is that if I run the logic most of the times it runs correctly, but if I run it a couple of times, there are strange values coming into the database.

What the logic does is this:

First it clears all records using rec(factor=0) and after that it recalculates the values. Most of the times this is going as expected, returning the correct values. However, if I run the logic multiple times, after about the 4th time, the values begin to double.

I already added the following settings to the appset parameters:




UNITPER_SP: 1000000

logicIs there anything else I can check? It doesn't seem to be an error in the logic syntax, as it works most of the times, but my gutfeelings says there is some error with the cleared values not being recognized by the remaining of the logic.

For example, this afternoon it ran ok for 4 hours, after which suddenly the issue re-appeared.

Kind regards,

Tim Vierhout

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos


You can also try adding the statement calculate_difference=0 and look at the following note:



Former Member
0 Kudos

Unfortunatly, calculate difference and commit is already in place.

What happens if I run a report during logic runtime what I see happening is the following:

Results in report become zero and after that they are updated. However, sometimes (so not always, usually only after running the package a couple of times in a short time period), the results are double of what they should be. Only the double values appear. The values are never trippled or quadrupled.

Edited by: Tim Vierhout on Feb 3, 2010 9:58 AM

Former Member
0 Kudos

Hi Tim,

Why not try using *CLEAR_DESTINATION instead of using *rec(factor=0) as this will ensure that destination is cleared before the calculation.


Former Member
0 Kudos

CLEAR destination could be a valid option, only it is not an option right now as it concerns a lot of rework (all logic).

Something else I noticed:

Just did a full optimize with compress. For the account that i am testing on, i now have 2 records in the facttable. This is fine, because there is a flow member to which a the value is copied.

Now i run the logicpackage untill I get the double records. This happened after 4 times.

After that, I checked the FACTWB table, where I expected to be 12 records (4 times 0 and 4 times the new value + 4 times the copied flowmember). However, there are 13 records. 4 Times 0, and 5 times the new value and 1 time the copied value (which is double of what I expected). So the 4th time, the new value is posted twice.

After that I checked the logic logfiles, In the logfiles, only 3 records are posted in each file, as expected. Also also in the file that resulted in the double post.

Former Member
0 Kudos

Hey Tim-

How did you get around this problem. we are facing a similar issue.

Could you please tell us how you fixed your problem.



Former Member
0 Kudos


If you have a commit statement after the rec statement, then the 0s should be written to the database and it should not cause any trouble.