cancel
Showing results for 
Search instead for 
Did you mean: 

IF Condition in SAP BPC 10.1 NW

Former Member
0 Kudos

Hi Experts,

I have a typical requirement as follows -

Dimensions in Model :

ENTITY, INTERCO, ACCOUNT and others

Values in Interco is always a prefix of I_ of Entity

My requirement is -

If ENTITY = INTERCO (Excluding first 2 chars in INTERCO)

If ACCOUNT = A,B,C,D then

transfer the value in A,B,C,D to X by making value in A,B,C & D

Script where i stuck -

*XDIM_MEMBERSET ACCOUNT = A,B,C,D

*XDIM_MEMBERSET ENTITY = BAS(ALL)

*XDIM_MEMBERSET INTERCO = BAS(ALL)

*WHEN ENTITY

*IS INTERCO - This is wrong. I want to check here ENTITY = INTERCO (In Interco need to ignore first 2 chars) or not

*REC(EXPRESSION = 0)

*REC(EXPRESSION = %VALUE%,ACCOUNT=X)

*ENDWHEN

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member186338
Active Contributor
0 Kudos

There are no string functions in script logic! Maintaining properties is the only way.

former_member186338
Active Contributor
0 Kudos

Looks like you have duplicated discussion in BPC MS. Can you ask questions about script logic in line with:

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

In the standard Entity dimension you have INTCO property (containing INTERCO member of this ENTITY member).

You can use something like:

*WHEN INTERCO

*IS ENTITY.INTCO

...

Former Member
0 Kudos

Hi Vadim,

Its mistakenly went in BPC MS discussion... my fault.

Thank you for responding.. but the problem is, in Entity Dimension under INTCO property they are not maintaining any values which is the biggest problem and looking for alternative approach.

I tried to write the code as follows but ending with errors... Any suggestions -

*XDIM_MEMBERSET ORU = BAS(BWORLD) //ENTITY DIMENSION

*XDIM_MEMBERSET FSITEM = 280833_1000, 280833_2000, 280833_3000

*XDIM_MEMBERSET DIM_A = BAS(I_WORLD) // STORES ALL INTERCO VALUES OF TYPE USER DEFINED

*SELECT(%PPORU%,"ID",DIM_A,"ID = 'BAS(I_WORLD)'")

*FOR %MYPPORU% = RIGHT(%PPORU%) 6 // I want to read last 6 CHARS which represents ORU

*WHEN DIM_1

*IS %MYPPORU%

*WHEN FSITEM

*IS 280833_1000

*REC(EXPRESSION = %VALUE%*-1) *REC(EXPRESSION = %VALUE%,FSITEM = 266811_1000)

*IS 280833_2000

*REC(EXPRESSION = %VALUE%*-1)

*REC(EXPRESSION = %VALUE%,FSITEM = 266811_2000)

*IS 280833_3000 *REC(EXPRESSION = %VALUE%*-1)

*REC(EXPRESSION = %VALUE%,FSITEM = 266811_3000)

*ENDWHEN

*ENDWHEN

*NEXT