Skip to Content
avatar image
Former Member

BPC Flow END calculation

Dear Experts,

I have some problems with the END calculation after running account base calculation or consolidation.

We have the movementtype END and Hierachy for movementtypes where the flows f.e.

E10 to E60 are calculated to E70 (END).

In the default logic script I define:

//Write Movementtype's on END
*XDIM_MEMBERSET MOVEMENTTYPE=BAS(E70),D99,BAS(E90),BAS(F99),BAS(599)
//*XDIM_ADDMEMBERSET MOVEMENTTYPE=BAS(E70),D99,BAS(E90),BAS(F99),BAS(599)
*WHEN MOVEMENTTYPE
*IS*
*REC(FACTOR=1, MOVEMENTTYPE = END)
*ENDWHEN
*COMMIT

So when I save data the calculation works fine. But if I run the account base member calculation rule, it does not calculate the END flow.

For example I want calculate in the Account base member calculation the Account 1283000 Movementtype F26 -> Account 2226400 Movementtype E55

Here works the calculation to E70 fine (Herarchy) but it does not write me the value also on END. This is the problem, when I enter data on E10 it works fine and calculate to E70 and END, but after the account base calculation the END value is not right, i does not refresh the END. And I have the problem also on other flows when I run the eliminations, too.

Can someone help here. We have BPC 10.0 SP15.

Thanks and best Regards

Daniel

Add comment
10|10000 characters needed characters exceeded

  • Former Member Vadim Kalinin

    Here is the full script code for the default script logic and also balancing and accountcalc which are included in default.

  • Please provide scripts inside your answers/comments as code texts (with correct lines).

    I have no time to retype scripts from pictures.

  • Former Member Vadim Kalinin

    Ok, here are the codes of the scripts (hope this is so ok for you with this code format /lines)

    1. DEFAULT.LGF

    *INCLUDE ACCOUNTCALC.LGF
    *COMMIT

    *INCLUDE BALANCING.LGF
    *COMMIT
    //Write Movementtype's on END
    *XDIM_MEMBERSET MOVEMENTTYPE=BAS(E70),D99,BAS(E90),BAS(F99),BAS(599)
    //*XDIM_ADDMEMBERSET MOVEMENTTYPE=BAS(E70),D99,BAS(E90),BAS(F99),BAS(599)
    *WHEN MOVEMENTTYPE
    *IS*
    *REC(FACTOR=1, MOVEMENTTYPE = END)
    *ENDWHEN
    *COMMIT

    2. ACCOUNTCALC.LGF

    *RUN_PROGRAM CALC_ACCOUNT
    CATEGORY = %ACTUALITY_SET%
    CURRENCY = %RPTCURRENCY_SET%
    TID_RA = %TIME_SET%
    //CALC=A
    OTHER = [ENTITY=%COMPANY_SET%]// or OTHER=[ENTITY=C1000] or [ENTITY=%ENTITY_SET%;INTCO=%INTCO_SET%...]
    *ENDRUN_PROGRAM
    *COMMIT

    3. BALANCING.LGF

    // Write P&L-result of 3849999 in Equity (2226400)
    *XDIM_MEMBERSET MOVEMENTTYPE=END
    //*XDIM_ADDMEMBERSET MOVEMENTTYPE=END
    //*XDIM_MEMBERSET ACCOUNT=*
    *XDIM_ADDMEMBERSET ACCOUNT=*
    *XDIM_ADDMEMBERSET AUDITID=*
    *WHEN ACCOUNT.GROUP
    *IS PL
    *WHEN MOVEMENTTYPE
    *IS END
    *WHEN AUDITID
    *IS *
    //*WHEN INTERCO
    //*IS P999999
    *REC(ACCOUNT=2226400,MOVEMENTTYPE=E40)
    //*REC(ACCOUNT=2226400,MOVEMENTTYPE=END)
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    *COMMIT

    // Write P&L-result of 3860000 in Equity (2240000)
    *XDIM_MEMBERSET MOVEMENTTYPE=END
    //*XDIM_ADDMEMBERSET MOVEMENTTYPE=END
    //*XDIM_MEMBERSET ACCOUNT=*
    *XDIM_ADDMEMBERSET ACCOUNT=*
    *WHEN ACCOUNT.GROUP
    *IS PM
    *WHEN MOVEMENTTYPE
    *IS END
    //*WHEN INTERCO
    //*IS P999999
    *REC(ACCOUNT=2240000,MOVEMENTTYPE=E40)
    *REC(ACCOUNT=2240000,MOVEMENTTYPE=END)
    *ENDWHEN
    *ENDWHEN
    //*ENDWHEN
    *COMMIT
  • Get RSS Feed

4 Answers

  • Dec 08, 2016 at 12:14 PM

    First: You are including account calculations BEFORE your script is writing END movement! How do you want it to calculate???

    Second: Your scripts are not correct in general, it's a bad idea to use *XDIM_MEMBERSET in default.lgf. Looks like you didn't read https://blogs.sap.com/2014/06/09/how-to-write-defaultlgf

    P.S. *COMMIT is useless with *WHEN/*ENDWHEN and *RUN_PROGRAM

    A lot of other minor issues...

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I change the Business rule and I get now the amount in the account-based calculationalso on END but the problem is, I get on END just the last saved amount. For example the Sum E70 hast the Movementtypes E10, E15, E40,E45. On E70 I have then the right amount but on END I get the last saved amount. So if I put on E40 an amount of 100 I have on END 100, after that I put on E45 an amount of 250 I should have on END 350 but I get 250 (the last amount) but on E70 I have the right amount of 350.

      I think the script with BAS (E70) does not work well to rec the sum on END.

  • Dec 08, 2016 at 04:39 PM

    Unfortunately my answer is lost due to SCN bug...

    Anyway, I am unable to understand completely the calculation logic looking on your scripts (incorrect in some cases).

    Please start again with detailed text description like:

    Case 1

    If user send data with AUDITID=HB4 and MOVEMENTTYPE=E25 and ACCOUNT=(list of Account ID's - please provide!).

    I want:

    Create record with negative original amount for same MOVEMENTTYPE=E25 and ACCOUNT=(list of Account ID's) but with AUDITID=RECLMINDIV

    Then assuming that MOVEMENTTYPE=E25 is a children of some: E70,E90,F99,599 (is it correct?)

    I want to recalculate MOVEMENTTYPE=END as a sum of E70,D99,E90,F99,599 for AUDITID= HB4 and RECLMINDIV and for ACCOUNT=(list of Account ID's)

    Other Case ...

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Case 1

      If user send data with AUDITID=HB4 and MOVEMENTTYPE=E25 and ACCOUNT=2224000

      I want:

      Create record with AUDITID=HB4 original amount for MOVEMENTTYPE=END and ACCOUNT=2224000

      Create record with negative original amount for same MOVEMENTTYPE=E25 and ACCOUNT=2224000

      AUDITID=RECLMINDIV

      Create record with negative original amount for MOVEMENTTYPE=END and ACCOUNT=2224000

      AUDITID=RECLMINDIV

      also

      Create record with AUDITID=RECLMINDIV original amount for MOVEMENTTYPE=E25 and ACCOUNT=2240000

      and

      Create record with AUDITID=RECLMINDIV original amount for MOVEMENTTYPE=END and ACCOUNT=2240000

      Then assuming that MOVEMENTTYPE=E25 is a children of some: E70

      (D99, F99,599 are parenths of other Movementtypes which I need also on END)

      I want also to recalculate MOVEMENTTYPE=END for ACCOUNT= 3849999 from MOVEMENTTYPE E40 for AUDITID=HB4 and from ACCOUNT=2226400 ((ACCOUNT=3849999, MOVEMENTTYPE=END) = (ACCOUNT=2226400,MOVEMENTTYPE=E40))

      That is the case what I need to calculate in BPC, hope it is better for understanding.

  • Dec 09, 2016 at 10:32 AM

    Sorry but logic described is strange:

    Lines in yellow will result in zero

    Result

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 09, 2016 at 12:55 PM

    Then I do not understand why do you need to recalculate 2226400 MOVEMENTTYPE=E40 from ACCOUNT=3849999 MOVEMENTTYPE=END

    Nothing was changed on the previous step!

    For 2226400 MOVEMENTTYPE=END it's another story:

    It will be changed in:

    *IS 2224000,2226100,2226200,2226300,2226400
    *REC(FACTOR=1,MOVEMENTTYPE=END) //line 2

    but also not clear!

    Add comment
    10|10000 characters needed characters exceeded