cancel
Showing results for 
Search instead for 
Did you mean: 

Replicate values on siblings

Former Member
0 Kudos

Hello,

could you please give me some hints on how to achieve the following:

Dimension Cost_Center

For a typical cost center (i.e. IT0002550) I have the following leaves

-IT0002550

--IT0002550.00

--IT0002550.01

--IT0002550.02

--IT0002550.03

...

--IT0002550.INP

In the excel interface I have created an EVDRE where the user flags (with value 1) the .INP cost center. I would like that this flag gets replicated on all other siblings by means of the default script logic.

Can you tell me how to tell the logic to do that?

Thanks a lot

Eliodeo

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I dont know whether I understood it properly or not.

The user will enter a value of 1 in IT0002550.INP and you want to have a logic which will copy this value of 1 to all the other children of IT0002550. Is this what you want?

You can have property, like, SOURCE and the value in that property for all the other members under IT0002550 will be IT0002550.INP. Have another property like INP and the value will be Y for all the INP members.

Your code can be:

*SELECT(%MY_INP%, "ID", "COSTCENTER", "[INP] = 'Y'")
*XDIM_MEMBERSET ACCOUNT = %ACCOUNT_SET%


*FOR %VAR% = %MY_INP%
   *RUNALLOCATION
      *DIM COSTCENTER WHAT = %VAR%; WHERE = [SOURCE] = "%VAR%"
   *ENDALLOCATION

*NEXT

*COMMIT

Hope you got the idea behind the script.

Former Member
0 Kudos

that's wonderful... it works great! I was stuck trying to find a way to generate siblings by means of an mdx on run time.

By the way is there a similar function/instruction? I tried to use a user-function to generate siblings along with a for-next loop, but it failed to work.

Elio

Former Member
0 Kudos

Hi,

There is an MDX to get the siblings of a member. For example,

[TIME].[2009.JAN].Siblings

Will return the siblings of 2009.JAN

You can get help on MDX functions from the below link from MSDN:

http://msdn.microsoft.com/en-us/library/ms145970.aspx

Hope this helps.

Former Member
0 Kudos

Hi Nilanjan,

I had the same problem as Eliodeo here, and while your solution to the problem is legit, it requires creating 2 additional properties and maintaining them, therefore the MDX function "Siblings" that you mentioned above looks much more promising.

I have been trying to find away to use this function for a few days now but to no avail.

Nilanjan, could you please show us how to populate a variable, say %MYVAR%, with siblings of a base member, say IT0002550.INP, as from example above.

Btw I am working with BPC 10 sp5 engine ABAP NW 7.4 BW 7.4

Answers (0)