Skip to Content
author's profile photo Former Member
Former Member

BPC script Not working after Migrating SAP BPC 10.0 BW 7.3 to BPC 10.1/BW 7.5

Hello

We are having an issue with default logic scripts after migrating from SAP BPC 10.0 on BW 7.3 to BPC 10.1 on BW 7.5 SP6.

The issue seems to be that when we have a variable being defined in sub 1 and being referenced in sub 2, it cannot recognize the variable at all.

Our code is something like below:

DEFAULT.LGF

SUB1 (Fills up variable %V_TIME%)

SUB2 (References variable %V_TIME%).

The statement in SUB2 that references variable %V_TIME% error's out. Do we have to change anything on the scripts as part of the migration to BPC 10.1? All the data saves are happening properly?

Thanks for your help.

Add a comment
10|10000 characters needed characters exceeded

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 28, 2017 at 10:20 PM

    Just wanted to add that all these scripts are running fine today in our BPC 100 environment. Also, our new BW 7.5 system is now running on HANA 2.0.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 28, 2017 at 10:26 PM

    When we merge all the code in subroutine 1 and subroutine 2 into 1 subroutine, it's working fine.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 29, 2017 at 01:49 AM

    If it was working in BPC 10.0 and not working now in BPC 10.1, it should be a bug. Is there any validation error?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 29, 2017 at 06:13 AM

    Sorry, but without full script text it's not possible to discuss the issue.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello

      No there is no validation error. Validation is successful.

      Here is the script for your reference:

      DEFAULT.LGF

      *INCLUDE RT_HC_SELECT

      *INCLUDE SUB_HEADCOUNT

      PLAN_PERIODS_SELECT

      INIT_DELETE

      RT_HC_SELECT.LGF

      *FUNCTION V_CCTR=%CCTR_SET%

      *FUNCTION V_EMPID=%EMPID_SET%

      SUB_HEADCOUNT.LGF

      *SUB PLAN_PERIODS_SELECT

      *SELECT(%SPER%,"[SPER]",SCENARIO,"[ID] = %SCENARIO_SET%")

      *SELECT(%EPER%,"[EPER]",SCENARIO,"[ID] = %SCENARIO_SET%")

      *SELECT(%STIME%,"[TIMEID]",TIME,"[ID] = %SPER%")

      *SELECT(%ETIME%,"[TIMEID]",TIME,"[ID] = %EPER%")

      *SELECT(%TIMEPER%,"[ID]",TIME,"[TIMEID]>= %STIME% AND [TIMEID]<= %ETIME% AND [LEVEL]='MONTH'")

      *ENDSUB

      *SUB INIT_DELETE

      *RUNALLOCATION *FACTOR = 0

      *DIM ACCOUNT WHAT=A900100,A900600,A900900,A900800; WHERE=<<<

      *DIM CCTR WHAT=V_CCTR; WHERE=<<<

      *DIM COMPANY WHAT=BAS(ALCO); WHERE=<<<

      *DIM DATASRC WHAT=GAAP; WHERE=<<<

      *DIM FAREA WHAT=BAS(ALFA); WHERE=<<<

      *DIM EMPID WHAT=V_EMPID; WHERE=<<<

      *DIM PCTR WHAT=BAS(ALPC); WHERE=<<<

      *DIM RPTCURRENCY WHAT=USD; WHERE=<<<

      *DIM SCENARIO WHAT=%SCENARIO_SET%; WHERE=<<<

      *DIM TIME WHAT=%TIMEPER%; WHERE=<<<

      *ENDALLOCATION

      *ENDSUB

      Error message after running the script

      RUN_LOGIC:Line No:7; Allocation Format Error model: Headcount. Package status: ERROR

      The issue is that it cannot pass the parameter (%TIMEPER%) from SUB PLAN_PERIODS_SELECT to SUB INIT_DELETE. If we hardcode the value on TIMEPER in SUB INIT_DELETE it works. If we copy all the code from SUB PLAN_PERIODS_SELECT to SUB INIT_DELETE it works too.

      Appreciate you guys looking into this.

      Bhavin

  • Posted on Aug 29, 2017 at 04:40 PM

    Use SELECT statements outside of *SUB - at the beginning of SUB_HEADCOUNT.LGF

    In general there is no reason to use includes and functions/subs. Use plain code for default.lgf without includes and subs.

    Add a comment
    10|10000 characters needed characters exceeded

    • The logic of this script is strange in general:

      For any data saved in the model perform clear for some months for some accounts. What is the idea???

      Also, if you simultaneously save data for 2 or more categories - the script will do strange things...

      May be it's better to start with business requirements and then create a correct script?

  • Posted on Sep 05, 2017 at 12:54 AM

    Bhavin, can you add a CALC=N in *SELECT(%TIMEPER%,"[ID]",TIME,"[TIMEID]>= %STIME% AND [TIMEID]<= %ETIME% AND [LEVEL]='MONTH'"). Just would like to narrow down if parent members are retrieved by the select.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.