cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in Script Logic

former_member566000
Participant
0 Kudos
174

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

*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

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

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

LIke

Before: A25: 5 A30: 3

After: A25: ? A30: ?

former_member566000
Participant
0 Kudos
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

former_member186338
Active Contributor
0 Kudos

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

former_member566000
Participant
0 Kudos

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