Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8392

Copying Sibling values based in a property

$
0
0

Hi Experts,

 

Explaining the challenge. We have a Product hierarchy like this:

 

PROD_TOTAL

A_NODE

    P_OTHER01

    P_001

    P_002

B_NODE

    P_OTHER02

    P_003

    P_004

 

All the "P_OTHER0X" members has a property to identify that is an other member with the value "Y".

 

We need to get the other value for each node and copy it to each sibling inside the node, without the "Y" value in the property.

 

In other words, if P_OTHER01 has 10, this value needs to be copied to P_001 and P_002, if P_OTHER02 has 30, this value needs to be copied to P_003 and P_004.

 

Now the code copies the sum of the 10 and 30 to P_001, P_002, P_003 e P_004. One of the reasons is because the user select the parent node in the package execution, like "PROD_TOTAL", and it is not going to be changed.

 

With this I/we need to think in a different approach, I was thinking to use LOOKUP for the same model/app but how to link in the lookup the siblings?!

 

Well, I think I explained to you the scenario. Below we have the part of the current code that is focusing on this:

 

*XDIM_MEMBERSET TIME = %TIME_SET%

*XDIM_MEMBERSET SCENARIO = %SCENARIO_SET%

*XDIM_MEMBERSET RPTCURRENCY = %RPTCURRENCY_SET%

*XDIM_MEMBERSET PRODUCT = %PRODUCT_SET%

*XDIM_MEMBERSET DATASRC = USER_INPUT

 

//Selecting the Other Products sibling for the Product selected in the package screen to be used in the ALC_MARKET_UNITS

 

*SELECT (%MKT%, [ID], PRODUCT, OTHER = Y)

*SELECT (%MKTSIB%,[ID],PRODUCT,[ID] = [%MKT%].[SIBLINGS])

*SELECT (%MKTBASE%, [ID], PRODUCT, OTHER<> Y)

 

 

*WHEN PRODUCT

*IS %MKTSIB%

*WHEN ACCOUNT

*IS MARKET_SIZE

*FOR %PRDBASE% = %MKTBASE%

*REC(FACTOR = 1, PRODUCT=%PRDBASE%)

*NEXT

*ENDWHEN

*ENDWHEN

 

Thanks in advanced any idea/input/help.


Viewing all articles
Browse latest Browse all 8392

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>