cancel
Showing results for 
Search instead for 
Did you mean: 

BPC 10.0 Transformation – Nested If Statement

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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

former_member186338
Active Contributor
0 Kudos

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...

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

former_member186338
Active Contributor
0 Kudos

Ups, transformation is executed BEFORE conversion!

Former Member
0 Kudos

Yes! Dint get what your pointing it to?