on 07-08-2014 9:36 AM
Dear Experts,
I want to ask a custom BADI ABAP code to get the hierarchy of a dimension member where Time Dependent Hieararchy is implemented in that dimension.
Currently we are using Interface method IF_UJA_DIM_DATA->get_hier_of_mbr to get the hierarchy reference.
Sample Code:
DATA: o_test TYPE REF TO if_uja_dim_data.
CALL METHOD o_test->get_hier_of_mbr
EXPORTING
i_member = lv_member
* i_dateto = lv_datum
RECEIVING
ro_hier = lo_hierarchy.
However after we implement the time dependent on the dimension, this method returns nothing unless we specified the i_dateto parameter to the method (which is optional).
While my requirement is to get the hierarchy of the member with the date when this logic is executed, putting SY-DATUM to this parameter does not give me the result that I need. I need to put the i_dateto as '99991231' so the hierarchy returned by this method is the latest hierarchy, but not the current date where this logic is executed.
Is there any way to make that the time hierarchy obtained is the one when the logic is executed? Or is there any other method that is feasible to meet with my requirements?
Thanks
Regards,
Siswono
Hi Siswono,
Have you tried to use the date from the TIME dimension for i_dateto?
Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andy,
I don't understand what do you mean by converting the date into the UJ_DATE format from TIME dimension member. As you know the format of TIME dimension is YYYY.MM, and the format of UJ_DATE is YYYYMMDD. How we can get the date if we can only get the month and year from the time dimension?
And also, I believe I have mentioned that when I put system parameter SY-DATUM which is the current date, the hierarchy does not return because the method itself only select from the enddate (i_dateto parameter) and not the range where the hierarchy exists.
Regards,
Siswono
Hi Siswono,
Ok, I see what you mean.
Then I would suggest that you determine the hierarchy end date first.
read the hierarchy table by determine its technical name, then find the hierarchy with your date that's between the start date and end date, then you can use the end date for the next step.
use get_hier_of_mbr with the determined end date.
Andy
User | Count |
---|---|
16 | |
3 | |
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.