Skip to Content

RUNLOGIC_PH Script gives different answer to called Script Logic

Hi,

We are upgrading from BPC 10.0 SP4 on BW 7.31 on MS-SQL --> BPC 10.1 on BW 7.51 on HANA.

I am finding a strange result in out RUNLOGIC_PH script (which worked before in BPC 10.0). I get a different results if I run the destination script from the calling Model than when I run the same script in the destination Model.

So, if I execute the RUNLOGIC_PH from the Consolidation Model, I get different figures than if I run the Script Logic directly in the ICMatching Model for the same Scope. (In the case of the specific data I am analysing, it's a factor of 9 times different).

I have a Consolidation Model executing the RUNLOGIC_PH

I have an ICMatching Model hosting the called code.

Calling Code from the Consolidation Model:

*START_BADI RUNLOGIC_PH
QUERY = OFF
WRITE = ON
APPSET = DD_BPC_IFRS
APP = ICMatching
DEBUG = ON
VALIDATION = ON
LOGIC = ALTERPC.LGF
DIMENSION ICACCOUNT = <ALL>
DIMENSION ICAUDITID = <ALL>
DIMENSION ACCOUNT = <NONE>
DIMENSION AUDITID = <NONE>
DIMENSION CCENTRE = <NONE>
DIMENSION CONSOSCOPE = <NONE>
DIMENSION LOB = <NONE>
DIMENSION SUPPACC = <NONE>
DIMENSION CATEGORY = %CATEGORY_SET%
DIMENSION CURRENCY = USD,ZAR
DIMENSION ENTITY = <ALL>
DIMENSION FLOW = <ALL>
DIMENSION INTERCO = <ALL>
DIMENSION PCENTRE = %PCENTRE_SET%
DIMENSION TIME = %TIME_SET%
*END_BADI

The ICMatching Model: ALTERPC.LGF (Called Code)

*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%
*XDIM_MEMBERSET CURRENCY = USD,ZAR
*XDIM_MEMBERSET ENTITY = BAS(LE_GDDHP)
*XDIM_MEMBERSET FLOW = <ALL>
*XDIM_MEMBERSET ICACCOUNT = <ALL>
*XDIM_MEMBERSET ICAUDITID = DEBIT1,CREDIT1,DEBIT2,CREDIT2
*XDIM_MEMBERSET INTERCO = <ALL>
*XDIM_MEMBERSET PCENTRE = %PCENTRE_SET%
*XDIM_MEMBERSET TIME = %TIME_SET%
*WHEN FLOW
*IS F99
*REC(FACTOR=1, FLOW="PL99",PCENTRE = ENTITY.COUNTRY)
*ENDWHEN
*COMMIT

Like I mentioned before, this used to work fine in BPC 10.0. Now I have to execute the code from the ICMatching Model for it to give the correct results. I do get results executing the RUNLOGIC, just that they are incorrect.

Anyone seen something like this before?

Kind Regards

Nick

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jul 24, 2017 at 04:44 PM

    Try to select only base members of dimension PCENTRE in VADIM_APC_INC:

    *SELECT(%PC%,[ID],PCENTRE,[ID]=%PCENTRE_SET% AND [CALC]=N) // Select only base members from %PCENTRE_SET%
    *XDIM_MEMBERSET PCENTRE=%PC%
    *WHEN FLOW
    *IS *
    *REC(FACTOR=1, FLOW="PL99",PCENTRE = ENTITY.COUNTRY)
    *ENDWHEN

    "When I run the code from ICMatching, as you have mentioned, no records are written. Weird." - no comments, you are doing something wrong. It has to work!

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 12, 2017 at 04:07 PM

    "Incorrect result" - means nothing! You have to test script on some narrow scope to demonstrate the different results for some clear set of members.

    By the way the scripts can be reduced:

    *START_BADI RUNLOGIC_PH
    QUERY = OFF
    WRITE = ON
    // APPSET = DD_BPC_IFRS - will use current environment!
    APP = ICMatching
    DEBUG = ON
    VALIDATION = ON
    LOGIC = ALTERPC.LGF
    //unused dimensions
    DIMENSION ACCOUNT = <NONE>
    DIMENSION AUDITID = <NONE>
    DIMENSION CCENTRE = <NONE>
    DIMENSION CONSOSCOPE = <NONE>
    DIMENSION LOB = <NONE>
    //used dimensions
    DIMENSION ICACCOUNT = <ALL>
    DIMENSION ICAUDITID = DEBIT1,CREDIT1,DEBIT2,CREDIT2 //!!!!!!!!!!!!!
    DIMENSION SUPPACC = <NONE>
    DIMENSION CATEGORY = %CATEGORY_SET%
    DIMENSION CURRENCY = USD,ZAR
    DIMENSION ENTITY = BAS(LE_GDDHP) //!!!!!!!!!!!
    DIMENSION FLOW = F99 //!!!!!!!!!!!!!!!!!
    DIMENSION INTERCO = <ALL>
    DIMENSION PCENTRE = %PCENTRE_SET%
    DIMENSION TIME = %TIME_SET%
    *END_BADI

    And the calling script:

    *WHEN FLOW //or any other dimension name
    *IS *
    *REC(FACTOR=1, FLOW="PL99",PCENTRE = ENTITY.COUNTRY)
    *ENDWHEN

    the scope will be defined by RUNLOGIC_PH

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 12, 2017 at 06:48 PM

    Hi Vadim,

    Thanks for the reply and for the assistance to the code. Appreciated. I will make the necessary adjustments and revert.

    I see that all the Scope is handled from the calling Script Logic, rather than in the destination Script Logic

    By "incorrect result", I mean the result we see on the 10.0 system (which is correct) differs from the 10.1 server (which is incorrect). This is for a specific slice of data. Either way, let me make the changes and revert.

    Thank you.

    Kind Regards

    Add comment
    10|10000 characters needed characters exceeded