0

# Issue in Script Logic

May 03 at 09:53 AM

31

Hi,

I have a situation in a company where i need to write a logic script in sap BPC 10.0 NW based on the positive and negative signs of 2 accounts,details are as below,

The below are 4 conditions,

1.Account 25 is positive and Account 30 is positive the value from account 30 should be added to account 25.

2.Account 25 is positive and Account 30 is negative the value from account 30 also should be added to account 25.

3.Account 25 is negative and Account 30 is positive the value from account 30 should be subtracted to account 25.

4.Account 25 is negative and Account 30 is negative the value from account 30 should be subtracted to account 25.

Kindly let me know if there is any possibility to write this 4 conditions in a logic script.

Thanks,

Samhita

Vadim Kalinin May 03 at 12:58 PM
0

*WHEN ACCOUNT_TATA

*IS 30 // 30, NOT 25!!!!

*REC(EXPRESSION=(%VALUE%>0) ? [ACCOUNT_TATA].[25]+[ACCOUNT_TATA].[30] : [ACCOUNT_TATA].[25]-[ACCOUNT_TATA].[30],ACCOUNT_TATA=25)

*ENDWHEN

Share
Vadim Kalinin May 03 at 10:38 AM
0

Not clear! Please provide a screenshot of the table with initial data and result

LIke

Before: A25: 5 A30: 3

After: A25: ? A30: ?

Show 3 Share
Condition 1: If both the accounts are positive

Before

A25= 300, A30=500

After

A25 = 800 (300+500) , A30=500

Condition 2: If Both accounts are Negative

Before

A25= -800, A30= -500

After

A25 = -300, A30=500

Condition 3: If A25 is Negative and A30 is positive

Before

A25= -800, A30= 500

After

A25 = -300, A30=500

Condition 4: If A25 is positive and A30 is Negative

Before

A25= 800, A30= -500

After

A25 = 1300, A30=500

Please find the attached logic script file I wrote for your reference,

question-related.txt

Thanks,

Samhita

Samhita Vankayalapati

Sorry, but are you sure that you provided correct figures for A30 in after case? I suspect 2 errors.

Oh Yes, I am sorry .

Here is the right one after adjusting those 2 errors.

Condition 1: If both the accounts are positive

Before

A25= 300, A30=500

After

A25 = 800 (300+500) , A30=500

Condition 2: If Both accounts are Negative

Before

A25= -800, A30= -500

After

A25 = -300, A30=-500

Condition 3: If A25 is Negative and A30 is positive

Before

A25= -800, A30= 500

After

A25 = -300, A30=500

Condition 4: If A25 is positive and A30 is Negative

Before

A25= 800, A30= -500

After

A25 = 1300, A30=-500