on 05-20-2011 11:03 PM
Hi!
I need to read a parent from an dimension. I tried use SELECT as follow:
*SELECT(%V_HIER_COST_CENTER%,"[PARENTH1]",COST_CENTER,"[ID]=%COST_CENTER_SET%"), but does not work because PARENTH1 is not an atribute from COST_CENTER. This field, PARENTH1, is part of a hierachy structure.
E.g.
I have a hierarchy like this:
COST_CENTER PARENTH1
10001 10000
10002 10000
10003 10000
I received 10001 in a parameter COST_CENTER (*XDIM_MEMBERSET COST_CENTER=%COST_CENTER_SET%) in my script logic. I need read the parent node 10000.
I just need to know the statement to read the parent node of a dimension.
Someone can help me?
Thanks in advanced.
Rafael
Have you tried referencing the property HIR?
Parenth1 would be H1.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
I need to read a parent from an dimension. I tried use SELECT as follow:
*SELECT(%V_HIER_COST_CENTER%,"PARENTH1",COST_CENTER,"ID=%COST_CENTER_SET%"), but does not work because PARENTH1 is not an atribute from COST_CENTER. This field, PARENTH1, is part of a hierachy structure.
E.g.
I have a hierarchy like this:
==========================================================
Hi,
Why don't you make a new field that represents PARENTH1? You may think it is redundant, but it is only way to make it recognized by *SELECT statement. It could be meaningful since I have a customer who has costcenter does not belong to its parent from collecting data, therefore we made collection field. It is fully relevant who can collect data because of people or system or regional distance, therefore it did perfectly make sense to have the field to represent data collection. In this case, if you make a field that represents parentH1, the statement you have does perfectly make sense.
Hope this helps,
YH Seo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
YH Seo,
I understood your point of view but is not exactly that I need. My main issue is read an hierarchy of a dimension. The COST_CENTER is just an example.
I have a parameter value and consequently its master data. In this master data I have attributes and hierarchies. I know what I can do to read an attribute but how can I read a parent field of a dimension?
I need to read this parent to use in a LOOKUP statement and all values are dynamics.
Thanks.
Nilanjan.
I am in the appl "B" and I need execute a LOOKUP in an appl "A". The company code dimension of appl "A" has a parent that a need to get the all member of appl "B" dimension. Something like this:
*SELECT(%V_COMPCODE%,"[PARENT]",COMP_CODE,"[ID]=%COMP_CODE_SET%")
*LOOKUP A
*FOR %V_PARENT% = %V_COMPCODE%
*DIM XXX:PLANT=%V_PARENT%
*NEXT
*ENDLOOKUP
....
If this code works, it would be exactly what I need.
The structure of these dimension is something like this:
Application "B" (when I executed the SELECT statement)
COMP_CODE.ID = A001, COMP_CODE.PARENTH1 = A001_ALL
Application "A" (when I executed the LOOKUP statement)
PLANT.ID = AA01, PLANT.PARENTH1 = A001_ALL
So I need to get parenth1 "A001_ALL" from COMP_CODE to get all members of PLANT with parenth1 value "A001_ALL" too.
I´ve already solve this but with a hard code parent.
Thanks.
Hi,
You can just use [COST_CENTER].[10000] in your logic to refer to the member.
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
15 | |
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.