cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Send data to an entity listed in member property

Former Member
0 Likes
300

Hi there,

I have 2 logic scripts that are used to push intercompany data into two different models: one for management reporting and one for statutory reporting.

The models have different dimensions, hence the separate scripts.

The destination entities are different for each script, and I need to get this information from a property in the Intercompany entity dimension.

So the straightforward...

*REC(FACTOR=1,LEGALENTITY=LEGALENTITY.SAP_CODE,ACCOUNTC=ACCOUNTC.GROUPACC)

...would normally work. BUT (there is always a "but") in the destination models, the SAP_CODE is prefixed, as per SAP recommendations. In the statutory model, I need to prefix the SAP_CODE value with "LE" but in the management model the prefix is "C". The actual value of the SAP_CODE property is the same, however.

So for example, in the Intercompany model the entity is 12345, with a SAP_CODE property value of 450. In the scripts, the values pushed to management should go to entity C450 and in statutory it should go to LE450.

In the good old days, we could do this LEGALENTITY="LE"+LEGALENTITY.SAP_CODE (or similar) but this doesn't work anymore. Has the syntax simply changed, or is this functionality not available any more?

I know I could just create a new property SAP_CODE2 and add the prefixes manually, but would like to avoid that if possible. I think this is possible in allocation logic, but allocation cannot push data to another model.

We are using BPC10NW, version 801 SP9, on BW 740 SP9 with HANABPC 801 SP7.

Thanks very much,

Jason

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member186338
Active Contributor
0 Likes

Hi Jason,

"I know I could just create a new property SAP_CODE2 and add the prefixes manually, but would like to avoid that if possible." - yes, you have to create second property with a correct prefix. No other way.

Vadim

Former Member
0 Likes

Hi Jason,

Could you try following code;

SELECT(%SAP_CODES%,SAP_CODE,ENTTIY,SAP_CODE<>'')

FOR %P_SAP_CODES% = %SAP_CODES%

*WHEN ENTITY.SAP_CODE

*IS %P_SAP_CODES%

*REC(FACTOR=1,LEGALENTITY=LE%P_SAP_CODES%,ACCOUNTC=ACCOUNTC.GROUPACC)

*ENDWHEN

*NEXT

Regards.

Burak

former_member186338
Active Contributor
0 Likes

Hi Burak,

Bad idea, incorrect results with multiple entities having same SAP_CODE property. And FOR/NEXT is extremely slow...

Vadim

Former Member
0 Likes

Hi Vadim, I think you're wrong. I use property value in for statement. So, commit should work per property. Also, you are right about for/next if you have a lot of member, if you have not, there is no problem. Burak

former_member186338
Active Contributor
0 Likes

Ups, with the code you have only repeated calculations may happen. The result will be correct!

*SELECT(%SAP_CODES%,SAP_CODE,ENTTIY,SAP_CODE<>'')

Can result in:

%SAP_CODES%=CODE1,CODE3,CODE1,CODE2,CODE2...

Vadim

P.S. Anyway, second property is better solution!