Skip to Content

Logic Script Issue

Hi,

I have an issue with the logic script in (SAP BPC NW 10.0) which is working same for two different months,

Please find the attached file for all the necessary details.

logic.txt

Thanks,

Samhita

image.png (32.1 kB)
logic.txt (8.8 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    May 11 at 09:46 AM

    Now the issue is clear!

    Instead of:

    *REC(EXPRESSION= %VALUE%>0 ? %VALUE%-[ACCOUNT].[IC_VAR_ADJ]: %VALUE%+[ACCOUNT].[IC_VAR_ADJ], AUDIT_TRAIL=INPUT,FLOW=F20)

    Use:

    *REC(EXPRESSION= %VALUE%>0 ? %VALUE%-([ACCOUNT].[IC_VAR_ADJ],[AUDIT_TRAIL].[IC_ADJ],[FLOW].[F_IC]) : %VALUE%+([ACCOUNT].[IC_VAR_ADJ],[AUDIT_TRAIL].[IC_ADJ],[FLOW].[F_IC]))

    And correct scope to:

    *XDIM_MEMBERSET AUDIT_TRAIL=INPUT
    *XDIM_MEMBERSET FLOW =F20

    Add comment
    10|10000 characters needed characters exceeded

  • May 10 at 07:33 PM

    First - it's not comfortable to read text attachment - why not to prepare question like here:

    https://blogs.sap.com/2014/01/31/how-to-ask-questions-about-script-logic-issues/

    Second:

    You have formula for scoped *XDIM_MEMBERSET ACCOUNT= 340900:

    REC(EXPRESSION= [ACCOUNT].[IC_VAR_ADJ]>0 ? %VALUE%+[ACCOUNT].[IC_VAR_ADJ]: %VALUE%-[ACCOUNT].[IC_VAR_ADJ]

    IC_VAR_ADJ
    2018.04 = -1366

    340900

    2018.04 = -16062

    Result:

    -1366<0

    -16062-(-1366)=-16062+1366=14696

    Why do you think that the result will be: 2018.04 = -17428???

    Are you sure that:

    340900

    2018.04 = -16062???

    May be:

    340900

    2018.04 = -17428

    Then -16062 is a correct result!

    Add comment
    10|10000 characters needed characters exceeded

  • May 11 at 08:25 AM

    To ensure that you have correct data please run in UJKT and post results:

    *XDIM_MEMBERSET ACCOUNT= 340900, IC_VAR_ADJ
    *XDIM_MEMBERSET TIME= 2018.04
    *XDIM_MEMBERSET CURRENCY= USD
    *XDIM_MEMBERSET VERSION= Test
    *XDIM_MEMBERSET SCOPE= S_NONE
    *XDIM_MEMBERSET ENTITY=CO_1000
    *XDIM_MEMBERSET COST_CENTER = CC_NONE
    *XDIM_MEMBERSET PROFIT_CENTER=PC_NONE
    *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_NONE
    *XDIM_MEMBERSET INTERCO=I_NONE
    *XDIM_MEMBERSET AUDIT_TRAIL=INPUT,IC_ADJ
    *XDIM_MEMBERSET FLOW =F20,F_IC
    *XDIM_MEMBERSET MEASURES= YTD
    *WHEN ACCOUNT
    *IS *
    *REC(EXPRESSION=%VALUE%)
    *ENDWHEN

    It will not change figures

    Add comment
    10|10000 characters needed characters exceeded

    • 2018.02

      UJKT result as per your logic
      FOR 2018.02 the result is correct
      
      LGX:
      
      
      *XDIM_MEMBERSET ACCOUNT= 340900
      *XDIM_MEMBERSET TIME= 2018.02
      *XDIM_MEMBERSET CURRENCY= USD
      *XDIM_MEMBERSET VERSION= Test
      *XDIM_MEMBERSET SCOPE= S_NONE
      *XDIM_MEMBERSET ENTITY=CO_1000
      *XDIM_MEMBERSET COST_CENTER = CC_NONE
      *XDIM_MEMBERSET PROFIT_CENTER=PC_NONE
      *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_NONE
      *XDIM_MEMBERSET INTERCO=I_NONE
      *XDIM_MEMBERSET AUDIT_TRAIL=INPUT,IC_ADJ
      *XDIM_MEMBERSET FLOW =F20,F_IC
      *XDIM_MEMBERSET MEASURES= YTD
      *WHEN ACCOUNT
      *IS * 
      *REC(EXPRESSION= %VALUE%>0 ? %VALUE%-[ACCOUNT].[IC_VAR_ADJ]: %VALUE%+[ACCOUNT].[IC_VAR_ADJ], AUDIT_TRAIL=INPUT,FLOW=F20)
      *ENDWHEN
      
      
      -------------------------------------------------------------------------------------------------------------------------------------
      LOG:
      
      
      LOG BEGIN TIME:2018-05-11 05:07:18
      FILE:\ROOT\WEBFOLDERS\CONSOLIDATION \ADMINAPP\Consolidation\TEST.LGF
      USER:SMITHA
      APPSET:CONSOLIDATION
      APPLICATION:Consolidation
      [INFO] GET_DIM_LIST(): I_APPL_ID="Consolidation", #dimensions=13 
      ACCOUNT,AUDIT_TRAIL,COST_CENTER,CURRENCY,ENTITY,FLOW,FUNCTIONAL_AREA,INTERCO,MEASURES,PROFIT_CENTER,SCOPE,TIME,VERSION
      
      
      #dim_memberset=13 
      ACCOUNT:340900,1 in total.
      TIME:2018.02,1 in total.
      CURRENCY:USD,1 in total.
      VERSION:Test,1 in total.
      SCOPE:S_NONE,1 in total.
      ENTITY:CO_1000,1 in total.
      COST_CENTER:CC_NONE,1 in total.
      PROFIT_CENTER:PC_NONE,1 in total.
      FUNCTIONAL_AREA:FA_NONE,1 in total.
      INTERCO:I_NONE,1 in total.
      AUDIT_TRAIL:IC_ADJ,INPUT,2 in total.
      FLOW:F20,F_IC,2 in total.
      MEASURES:YTD,1 in total.
      
      
      REC :%VALUE%>0 ? %VALUE%-[ACCOUNT].[IC_VAR_ADJ]: %VALUE%+[ACCOUNT].[IC_VAR_ADJ]
      
      
      CALCULATION BEGIN:
      QUERY PROCESSING DATA
      QUERY TIME : 1.00 ms. 2  RECORDS QUERIED OUT.
      QUERY REFERENCE DATA
      QUERY TIME : 1.00 ms. 4  RECORDS QUERIED OUT.
      CALCULATION TIME IN TOTAL :0.00 ms.
      1  RECORDS ARE GENERATED.
      CALCULATION END.
      
      
      ENDWHEN ACCUMULATION: 1  RECORDS ARE GENERATED.
      
      
      DATA TO WRITE BACK:
      ACCOUNT AUDIT_TRAIL COST_CENTER CURRENCY ENTITY FLOW FUNCTIONAL_AREA INTERCO PROFIT_CENTER SCOPE TIME VERSION SIGNEDDATA
      340900 INPUT CC_NONE USD CO_1000 F20 FA_NONE I_NONE PC_NONE S_NONE 2018.02 Test - 2435.31
      1  RECORDS HAVE BEEN WRITTEN BACK.
      WRITING TIME :1.00  ms.
      
      
      SCRIPT RUNNING TIME IN TOTAL:3.00 s.
      LOG END TIME:2018-05-11 05:07:20
      
  • May 11 at 12:12 PM

    Better version of this script! Try to understand why? :)

    XDIM_MEMBERSET ACCOUNT= 340900, IC_VAR_ADJ
    *XDIM_MEMBERSET AUDIT_TRAIL=INPUT,IC_ADJ
    *XDIM_MEMBERSET FLOW =F20,F_IC
    *XDIM_MEMBERSET TIME= 2018.04
    *XDIM_MEMBERSET CURRENCY= USD
    *XDIM_MEMBERSET VERSION= Test
    *XDIM_MEMBERSET SCOPE= S_NONE
    *XDIM_MEMBERSET ENTITY=CO_1000
    *XDIM_MEMBERSET COST_CENTER = CC_NONE
    *XDIM_MEMBERSET PROFIT_CENTER=PC_NONE
    *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_NONE
    *XDIM_MEMBERSET INTERCO=I_NONE
    *XDIM_MEMBERSET MEASURES= YTD
    *WHEN ACCOUNT
    *IS 340900
      *WHEN AUDIT_TRAIL
      *IS INPUT
        *WHEN FLOW
        *IS F20
          *REC(EXPRESSION=%VALUE%)
        *ENDWHEN
      *ENDWHEN
    *IS IC_VAR_ADJ
      *WHEN AUDIT_TRAIL
      *IS IC_ADJ
        *WHEN FLOW
        *IS F_IC
          *REC(EXPRESSION=([ACCOUNT].[340900],[AUDIT_TRAIL].[INPUT],[FLOW].[F20])>0 ? -%VALUE% : %VALUE%,ACCOUNT=340900,AUDIT_TRAIL=INPUT,FLOW=F20)
        *ENDWHEN
      *ENDWHEN
    *ENDWHEN

    Not clear what to do if

    ([ACCOUNT].[340900],[AUDIT_TRAIL].[INPUT],[FLOW].[F20])=0 or record is missing! + or - ???

    Add comment
    10|10000 characters needed characters exceeded