Skip to Content
avatar image
Former Member

Invalid *SELECT: "Error running default logic () Unknown Dimension Name in Keyword: ___"

Hello experts,

This question is related with another one:

Reading signeddata in script logic BPC NW 10.1

That question was solved through ternary operator in *REC, but it appeared a new problem with *SELECT. I detail:

I am working in BPC 10.1 for NW. These are the BPC and BW components:

The K2 calculation engine used is ABAP (i guess because the error says: "Unknown Dimension Name in Keyword: <MEMBER_ACCOUNT>")

My model is called CASHFLOW and has the following dimensions: CATEGORY (C), ACCOUNT (A), ACCR_DATE (T), ENTITY (E), FLOW (S), AUDITTRAIL (D), RPTCURRENCY (R), INTERCO (I) and DUE_DATE (U2).

The account members involved in this process are like these examples:

The purpose of the script is to run as DEFAULT.LGF. The code is in CUENTAS_AST_LEQ script, but this one is included in DEFAULT.LGF by *INCLUDE keyword.

The calculation logic would be: during a transactional data upload from BW (actual data), if a certain AST account has a negative signeddata (credit balance), then save that signeddata in another LEQ account (the same AST account with suffix "P"), removing the original account (AST). Thanks to Vadim Kalinin, I have applied a ternary operator to manage this.

The problem comes up when I try to use *SELECT keyword in order to set dinamically the account members but I cannot get it. I am trying to select the account set with the property CF_COMPRAS. Those accounts have the value "P" in that property (see screenshot above).

This is my actual script:

//*SELECT(%ACC%, ID, ACCOUNT, CF_COMPRAS = P)
*SELECT(%ACC%, "[ID]", ACCOUNT, "[CF_COMPRAS] = 'P'")

*XDIM_MEMBERSET ACCOUNT = %ACC%
*XDIM_MEMBERSET AUDITTRAIL = CF_REAL,CF_CARTERA,CF_PLAN
*XDIM_MEMBERSET FLOW = CF_100
*XDIM_MEMBERSET RPTCURRENCY = LC

*WHEN ACCOUNT
*IS *
*REC(EXPRESSION = %VALUE% < 0 ? %VALUE% * -1 : %VALUE% * 0, ACCOUNT = %ACC%P)
*REC(EXPRESSION = %VALUE% < 0 ? %VALUE% * 0 : %VALUE% * 1)
*ENDWHEN
*COMMIT

The data sent by user will be something like that (one record example):

ENTITY=6000

ACCR_DATE=2016.12

DUE_DATE=2016.12

CATEGORY= CF_2016.12

AUDITTRAIL=CF_CARTERA

ACCOUNT=55100001

FLOW=CF_100

INTERCO=I_NONE

RPTCURRENCY=LC

SIGNEDDATA= -1000

I can validate the script without problems, but when I send this record (through input schedule to test it), I get the following error:

Any idea?

I would appreciate your help.

Kind regards,

Manu

components.png (48.4 kB)
error.png (12.8 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jun 07, 2017 at 06:58 PM

    Solution:

    In CF_COMPRAS property instead of "P" put the required destination account:

    For 55230000 fill CF_COMPRAS with 55230000P

    etc.

    Code:

    *SELECT(%ACC%, "[ID]", ACCOUNT, "[CF_COMPRAS]<>''") //not empty CF_COMPRAS property
    //Don't use *XDIM_MEMBERSET in default.lgf
    *WHEN AUDITTRAIL
    *IS CF_REAL,CF_CARTERA,CF_PLAN
    *WHEN FLOW
    *IS CF_100
    *WHEN RPTCURRENCY
    *IS LC
    *WHEN ACCOUNT
    *IS %ACC%
    *REC(EXPRESSION = %VALUE% < 0 ? %VALUE% * -1 : %VALUE% * 0, ACCOUNT = ACCOUNT.CF_COMPRAS) //get destination account from property!
    *REC(EXPRESSION = %VALUE% < 0 ? %VALUE% * 0 : %VALUE% * 1)
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN

    Please read also: https://blogs.sap.com/2014/06/09/how-to-write-defaultlgf/

    And don't use useless *COMMIT

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 07, 2017 at 06:48 PM

    I can see a clear error in the script

    *SELECT(%ACC%, "[ID]", ACCOUNT, "[CF_COMPRAS] = 'P'")

    will result in %ACC%=55230000,55230001,55230002

    and the line:

    *REC(EXPRESSION = %VALUE% < 0 ? %VALUE% * -1 : %VALUE% * 0, ACCOUNT = %ACC%P)

    will result in:

    *REC(EXPRESSION = %VALUE% < 0 ? %VALUE% * -1 : %VALUE% * 0, ACCOUNT = 55230000,55230001,55230002P)

    Absolutely incorrect!

    Add comment
    10|10000 characters needed characters exceeded