cancel
Showing results for 
Search instead for 
Did you mean: 

BPC 10: Destination_model - using attribute to fill destination dimension.

Former Member
0 Kudos

Hi,

I'm struggling with a simple script, that should move data from one Model to Another.  (no filters for this example)

The source model doesn't have "profitcenter" as a separate dimension, but it's a attribute on the costcenter dimension (profitcenter_attr).

The target model (Cost) has profitcenter as a separate dimension.

I can't get the syntax correct. I've tried both "rename_dim" and "Add_dim", but syntax fails.

Any ideas ?

*DESTINATION_MODEL = COST

*SKIP_DIM = Employee

//*RENAME_DIM   PROFITCENTER =  CostCenter.PROFITCENTER_ATTR

//*RENAME_DIM   PROFITCENTER =  PROFITCENTER_ATTR

//*ADD_DIM PROFITCENTER = CostCenter.ProfitCenter_ATTR

*WHEN *

*IS *

   *REC(EXPRESSION=%VALUE%, PROFITCENTER = CostCenter.ProfitCenter_ATTR)

*ENDWHEN

*COMMIT

Thank you,

Joergen

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186498
Active Contributor
0 Kudos

Hi Joergen,

this should works

...

*RENAME_DIM   PROFITCENTER =  CostCenter

*WHEN *

*IS *

   *REC(EXPRESSION=%VALUE%, PROFITCENTER = CostCenter.ProfitCenter_ATTR)

*ENDWHEN

*COMMIT

Regards

     Roberto

Former Member
0 Kudos

Hello Roberto,

Thank you, but i've tested, and it doesn't work. (Notice my costcenter is called Costcenter_)

*DESTINATION_MODEL = COST

*SKIP_DIM = Employee

*RENAME_DIM   ProfitCenter =  CostCenter_

*WHEN *

*IS *

*REC(EXPRESSION=%VALUE%, ProfitCenter=CostCenter_.ProfitCenter_ATTR)

*ENDWHEN

*COMMIT

The validations gives me this error:

"

Model: Salary

Logic file: COPY_TO_COST.LGF

Validation status of executable file: Failed

- Invalid dimension PROFITCENTER in LOOKUP rule

Validation status of syntax: Failed

- Invalid syntax found; see statements in red"

The logic debugger says:

Invalid dimension PROFITCENTER in lookup rule.

Though the weird part is that the validation ALSO fails, if i simply put profitcenter equal to a fixed value:

*ADD_DIM ProfitCenter = "PC1"

The destination model "cost" is processed and contains the dimension ProfitCenter.

I'm open for all ideas. It's SAP BPC 10 sp15.

regards

Joergen

former_member186498
Active Contributor
0 Kudos

Hi Joergen,

is your system_constant.lgl file in the adminapp->COST updated?

Regards

     Roberto


Former Member
0 Kudos

Hi Roberto,

no, there is no "system_constant.lgl" in any of my models or environtments (except for the IFRS demo content).

If I need an application constant. How should the logic look like ?

I tried the following:

// application constants

//--------------------------------------------

*FUNCTION CostCenter_.ProfitCenter_ATTR=ProfitCenter

It still fails with previous error in both validation and logic debugger.. 😕

Thank you,

Joergen

former_member186498
Active Contributor
0 Kudos

Hi Joergen,

maybe you doesn't need it more in 10 version (I work with 7.5),

the syntax should be
*FUNCTION PROFITCENTER =%PROFITCENTER_DIM%

look if you have the system_constant.lgt in SYSTEMLIBRARY\LOGIC LIBRARY of your environment

Regards

     Roberto

Former Member
0 Kudos

Hi Roberto,

thank you for your suggestions. I just discovered that I have an error in the "dimension cache" file for Profitcenter, this is probably why the syntax fails with error in lookup.

I will look further into it, and keep this thread updated with the findings.

Thank you,

Joergen

former_member186498
Active Contributor
0 Kudos

Hi Joergen,

good to know that it was useful, let us know as well if the initial error is resolved

Regards

     Roberto

Former Member
0 Kudos

Hi,

unfortunately, the problem was not related to the error in the dimension cache file.

I still get error..

I'm out of ideas, i've tried everything. This is a simple script, which should work. I've mainly worked with NW, and here the syntax is a bit different.

The BPC 10 (sp15) is a fresh new installed system, perhaps, I need to set a parameter somewhere?

regards

Joergen

former_member186498
Active Contributor
0 Kudos

Hi Joergen,

to resume

*DESTINATION_MODEL = COST

*SKIP_DIM = Employee

*RENAME_DIM   ProfitCenter =  CostCenter_

*WHEN *

*IS *

*REC(EXPRESSION=%VALUE%, ProfitCenter=CostCenter_.ProfitCenter_ATTR)

*ENDWHEN

*COMMIT

give a syntax error? no message? can you please post the entire script (I think you have more dims ...)?

do you have a system_constant.lgt and lgl in your system or is it missing in 10 version?

Regards

     Roberto