Skip to Content
author's profile photo Former Member
Former Member

Data sharing among members of the same dimension throgh a script logic,.

Hello,

we are trying to do a data sharing among members of the same dimension through a script logic, using a property of the dimension. We can o do that with the Time dimension but not with another dimension (entity type).

In the Time dimension we use %YEAR% to share a data load in one member to others member whose property year is the same., but this code is common of this dimension.

How we can do, to share a data that is load in a generic member, to others members of the dimension according to the a (COUNTRY) property?

For example we have a generic member SPAIN_INP ( COUNTRY PROPERTY is SPAIN) and we need to do the sharing or copy the load data in others members, (for example: WSPAIN or MHSPAIN) whose country property is SPAIN too.

Many thanks for your help.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Dec 17, 2010 at 01:38 AM

    Hi,

    The way to do this would be to first have a Lookup on the dimension based on the properties you want. You can then use this retrieved value in the REC statement.

    This is an example for it:

    *DIM CATEGORY=CATEGORY

    *DIM TIME=TIME

    *LOOKUP RATE

    *DIM ENTITY2="DEFAULT"

    *DIM RATE=ACCOUNT.RATETYPE

    *DIM SOURCECURR:INPUTCURRENCY=ENTITY.CURR

    *DIM DESTCURR1: INPUTCURRENCY="USD"

    *DIM DESTCURR2: INPUTCURRENCY="EURO"

    *ENDLOOKUP

    *WHEN ACCOUNT.RATETYPE

    *IS "AVG","END"

    *REC(FACTOR=LOOKUP(DESTCURR1)/LOOKUP(SOURCECURR),CURRENCY=u201DUSDu201D)

    *ENDWHEN

    *COMMIT

    Hope this helps.

    Santosh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 17, 2010 at 02:23 AM

    Hi,

    You may try using a SELECT variable, a FOR loop and a REC statement to do this copy.

    Try something like this,

    assuming your dimension name is Entity,

    *SELECT(%ENTITY_LIST%,ID,ENTITY,COUNTRY='SPAIN' and CALC='N' and ID<(not equal sign)>'SPAIN_INP')

    *XDIM_MEMBER ENTITY=SPAIN_INP

    *WHEN *

    *IS *

    *FOR %ENTITY%=%ENTITY_LIST%

    *REC(ENTITY=%ENTITY%)

    *NEXT

    *ENDWHEN

    *COMMIT

    Hope this helps.

    Karthik AJ

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Nerea,

      As Nilanjan has rightly suggested, you can try utilizing the *SELECT statements to get the list of members to be processed dynamically. You can build the list of members you need with the help of the *SELECT statement.

      You can bring all the INP members in the scope using XDIM_MEMBERSET and use another *FOR loop to loop through all the members for each country you need, along with the proper use of *WHEN statement.

      Hope this helps.

      Karthik AJ

  • author's profile photo Former Member
    Former Member
    Posted on Dec 17, 2010 at 04:16 AM

    Hi,

    Adding to what others have said. What you need to do is to first fetch all the members based on the value of the property. Please refer to the select statement in the below link from help.sap:

    http://help.sap.com/saphelp_bpc75/helpdata/en/12/bddcd3f6ba42f1aeb0b500fca1b876/content.htm

    Once you have all the members, you get the destination of the data. The source you already have with you. So, now, you can either copy or do allocation, based on your needs.

    Hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.