Skip to Content
0

BPC 10.0 Transformation – Nested If Statement

Oct 16, 2016 at 11:15 PM

870

avatar image

Hi Guys

BPC 10.0 Transformation – Nested If Statement

Our objective is to add a dynamic CCtr member when certain conditions are met when loading data from a BW infoprovider to BPC cube using a BPC transformation file.

The error message is ‘Line1 :Command failed ; end position is out of record index’

We are following the EPM End User Guide Example for a multiple conditional test as follows:

*If (Condition1 then Action1;Condition2 then Action2;Default Action)

We have tried the following BPC Transformation syntax for CostCenter:

OPTION – 1 (pls see image attached)

COSTCENTRE=*If (0COSTCENTER+0WBS_ELEMT(1:2) = *Str(CS) then *Str(6)+ZCSCH_COD+*Str(201);0COSTCENTER = *Str() then *Str(CC000);0COSTCENTER(3:10))

OPTION - 2(pls see image attached)

COSTCENTRE=*If (0COSTCENTER(3:3)= *Str(6) then 0COSTCENTER(3:10);0COSTCENTER +0WBS_ELEMT(1:2) = *Str(CS) then *Str(6)+ZCSCH_COD+*Str(201);*Str(CC000))

Results: With both options, Condition 1 results in the correct ‘accept count’, with the relevant transactions being successfully modified. However, transactions that fall within condition 2 OR the Default Action, land in the ‘Reject Count’

Any insights much appreciated; we wish to avoid using a badi if possible.

Thanks Glen

Product Details:

EPM 10.0 SP20 Patch 1 .NET4 Build 9042

CPMBPC Release 810: SP Level 0004 SAPK-81004INCPMBPC

option-1-image.png (125.5 kB)
option-2-image.png (120.4 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Priyanka Jagtap Oct 17, 2016 at 06:59 AM
0

Hi Glen,

can you explain me your condition for cost center? I mean the functional reason? Why the 0WBS_Elemt is considered only for 1 condition?

and as per your second screenshot.....the Option 2 0COSTCENTER is missing before 0WBS_elemnt.....COSTCENTRE=*If (0COSTCENTER(3:3)= *Str(6) then 0COSTCENTER(3:10);0COSTCENTER +0WBS_ELEMT(1:2) = *Str(CS) then *Str(6)+ZCSCH_COD+*Str(201);*Str(CC000)).

Can you show the costcenter ID's as well....... Option 1 is working well? then what is the issue?

Regards,

JP

Show 4 Share
10 |10000 characters needed characters left characters exceeded

Hi JP

The detailed objective/Functional Requirement is :

If CCtr is not blank, then use CCtr

If Cost Center is blank AND the WBS field starts with either CS, then derive the CCtr from the BW info-object attribute ZCSCH_COD

Otherwise use CC000

Essentially we wish to add a derived CCtr for capex transactions (where the WBS starts with "CS"). That is why the WBS is only considered in one condition.

An example of a CCtr id in both BW and BPC is:

0061061201 (BW) and 61061201 (BPC)

Note that neither options are working completely...the 'End position is out of record index' is triggered for both, however the first condition in each option results in an 'accept count' .

Hi Vadim

0WBS_ELEMT is sometimes blank so 0WBS_ELEMT(1:2) may be causing the error.

Thanks for the help.

Glen

0

Hi Glen,

If the 0WBS_ELEMT has blanks...then from Set Selection ignore the blanks using the BT range! Use 1 to 9999999 etc.

For ignore the leading zeros for Costcenter instead of giving the strings 3:10..use javascript in the conversion file for Costcenter.

EXTERNAL INTERNAL * js:parseInt(%external%)

Then check with this condition

COSTCENTRE=*If (0COSTCENTER+0WBS_ELEMT= *Str(CS) then *Str(6)+ZCSCH_COD+*Str(201);0COSTCENTER = *Str() then *Str(CC000);0COSTCENTER)

Let me know if this works.....

Regards,

JP

0

Ups, transformation is executed BEFORE conversion!

0

Yes! Dint get what your pointing it to?

0
Vadim Kalinin Oct 17, 2016 at 07:19 AM
0

Sorry, but it's not possible to help you without investigation of master data you have!

End position is out of record index can be a result of conflict between the value and statement 0COSTCENTER(3:10) (if 0COSTCENTER is less then 10 characters) Etc...

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

Hi Vadim

Yes, 0COSTCENTER is blank some time as well (EG refer image below). The attached example file shows two records...both have 0COSTCENTER as blank while the 0WBS_ELEM is populated on one of the rows.

Thanks

Glen

0
Glen Baker Oct 20, 2016 at 11:13 PM
0

Thank you both for your input - i have resolved the issue via manipulation of selection parameters.

Share
10 |10000 characters needed characters left characters exceeded