Skip to Content

Issue in Script Logic

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    May 03 at 12:58 PM

    *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

    Add comment
    10|10000 characters needed characters exceeded

  • May 03 at 10:38 AM

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

    LIke

    Before: A25: 5 A30: 3

    After: A25: ? A30: ?

    Add comment
    10|10000 characters needed characters exceeded

    • 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