Skip to Content
0

IF Condition in SAP BPC 10.1 NW

Oct 26, 2016 at 08:05 PM

41

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Vadim Kalinin Oct 26, 2016 at 08:46 PM
0

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

...

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0
Vadim Kalinin Oct 27, 2016 at 07:39 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded