on 10-17-2016 12:15 AM
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
Thank you both for your input - i have resolved the issue via manipulation of selection parameters.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
User | Count |
---|---|
15 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.