Determine key date at runtime for time-dependant hierarchies

Hello all,
I have to develop a query based on time-dependant  and version-dependant hierarchy.
I have selection variables for -
Fiscal year
posting period
version
and hierarchy .
I want to achieve this -
First I want to enter Fiscal Period and posting period and version as user input.
Once this input is done I want to determine the key date based on fiscal year and posting period.
Once the key date is determined i want the hierarchy variable dropdown to show only correct hierarchy in that time for selection.
Is it possible? Please suggest the ways.
Many thanks and best regards,
Surekha

I have written following code for determining key date based on fisc year and posting period.
It may be useful for someone
WHEN  'key date variable'.
    REFRESH e_t_range.
    CLEAR l_s_range.
    IF i_step = 2.
      READ TABLE i_t_var_range INTO loc_var_range WITH KEY vnam = 'fisc year variable'.
      l_date(4) = loc_var_range-low.
      CLEAR loc_var_range.
      READ TABLE i_t_var_range INTO loc_var_range WITH KEY vnam = 'posting period variable'.
      IF loc_var_range-low >= 12.
        l_date+4(4) = '1201'.
      ELSE.
        l_date+6(2) ='01'.
        l_date4(2) = loc_var_range-low1(2).
      ENDIF.
*get the last day of the posting period month
     CALL FUNCTION 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
        EXPORTING
          day_in            = l_date
        IMPORTING
          last_day_of_month = l_date
        EXCEPTIONS
          day_in_not_valid  = 1
          OTHERS            = 2.
      l_s_range-low = l_date.
      l_s_range-sign = 'I'.
      l_s_range-opt  = 'EQ'.
      APPEND l_s_range TO e_t_range.
    ENDIF.

Similar Messages

  • APD query key date with variable for time dependent MD display attributes

    Hello,
    In a APD I use a query as a source with a query key date that is filled with a customer exit variable.
    When I run the query as a user, the time dependent MD display attributes look fine. However, when I use the query in an APD, I get no values for the time dependent display attributes.
    Any suggestions?
    Thanks

    Hi,
    Try to run query using RSCRM_BAPI Tcode, this you can also schedule in background
    Thanks
    Reddy

  • Wrong data in cube for time dependent nav attribute

    Hi Experts,
    I am facing a strange problem.
    One of the navigational attr used in one cube was not time dependent before.
    Now we have changed it to time dependent.
    But after that the cube is fetching wrong data for the nav attr.
    In the Master data table (Q table) data is fine.
    Kindly suggest.
    Regards,
    Debjani

    Hi Debjani,
    As Federico said, when you display the content of the cube (or when you execute a query) you enter the reference date on which the time-dependant attribute will be searched. This unique reference date will be used whatever the cube data is.
    Ex :if the reference date is 2010/02/14, you will have the time-dep attribute value for 2010/02/14,for 2011 data, 2010 data or whatever.
    If you want to change dynamically the reference date depending on a date on the cube, things become a lot more difficult. The only possibility I can think of is "virtual characteristics" (you will find a lot of litterature on the subject on sdn).
    Regards,
    Fred

  • No entry in table T554C for key 40 01 01 for time 26.08.2009

    Hello experts,
    I am simulating payroll, after entering an absence,
    Its giving error like - No entry in table T554C for key 40 01 01 for time 26.08.2009
    I have checked this table and there is entry for the respective absence.
    Why still that error is coming ?
    Will you please help me out to simulate my payroll with absence valuation ?
    Thanks and Regards
    Jaydeep Jadhav

    Hello Revathi,
    thanks for replying me ...
    yes ... i am using -ve time management.
    my payroll schema name is ZN00
    tc00 is commented already
    system stops at Processing of time data PAB edit absence data
    Thanks in advance.
    Jaydeep Jadhav
    Edited by: Jaysaphr on Aug 26, 2009 5:14 PM

  • What exactly is Update method Master data attrib with a Time dependency ?

    Hi Experts,
    I have a Update rule in which i have an Update Method  "Master Data Attrib of " with Time dependency
    basically we are loading (update rule of )   0PAYROLL AREA ,
                  at Master data attribute of  we have 0EMPLOYEE
                  at Time Dependency When reading Master Data  END radio button is checked
                  frm it is mention as 0CALDAY.
    please explain what is function of 0calday here?
    I understand that 0PAYROLL AREA is a attribute of 0Employee and since from R/3 we are getting only 0EMPLOYEE so we are filling it from 0employee but  what is the significance of 0CALDAY here?
    Regards,
    RG

    Hi RG,
    It fills the valid value of 0PAYROLL for a particular 0EMPLOYEE in a particular time frame.
    Elaboration.
    Say  Employee          Payroll                  Valid from          Valid to
            RG                    1000000                 01.01.2007        31.12.2007
            RG                    2000000                 01.01.2008        31.12.2008
            RG                    3000000                 01.01.2009        31.12.2009
    The if your transaction data has RG employee in it with a transaction on 0CALDAY = 12.05.2007 then the valid payroll at that time would be 100000.
    On Calday 05.05.2009 your payroll would be 300000.........
    So for different days different payroll values would be valid.
    You require calday to find out which payroll value is valid in the timeframe of a transaction.
    In your update rule it is bringin the value of valid attribute value for the time of the transaction.
    Hope it helps,
    Regards,
    Sunmit.

  • Hierarchies for  time  dependent

    hi,
       i want the use of  time dependent hierarchies.. and what is the difference between  TIME DEPENDENT  HIERRACHIE STRUCTURE... AND.... ENTIRE HIERARCHIES  IS TIME  DEPENDENT
               I  done with    HIERARCHIES  NOT TIME DEPENDENT.. So, plz explain the  use  for that.. and  if possible give me  any scenarios...
    with regards
    prakash

    Hi
    See this
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a6702e07211d2acb80000e829fbfe/frameset.htm
    Two clear examples are given
    Bye
    N Ganesh

  • Real time Example for Time depend Characterstics...

    Real time Example for Time depend Characterstics.
    In which Situation we have to swith to time dependent.

    hi ,
    for ex. employee designation which changes over a period of time but not frequently , also headcount and also stock etc .
    which is related to change over a period of time .
    regards .... kumar Sarvepalli ///// honor points if helpful

  • Regarding performance issue in time dependent hierarchie.

    hai
    we are loading time dependent hierarchies from flatfile to bw,it is weekely load,we have nearly one million records loaded,we got an issues regarding change of these hierarchies timely.when ever there occurs a change in hierarchy a new row is added to the table,it is degrading the performance,can any one of you please suggest  how to over come performance related issues regarding time dependent hierarchies.
    Regards
    Srinivas.G

    hello deven,
    if you are only focusing on your application's performance
    on the aspect of usability i.e. less waiting time, fast
    response UI, i would personally suggest you to use AJAX.
    put some processing part on the browser side and making
    data retrieval from MI asynchronous... this way, your user
    don't have to wait for all data to be presented, but rather
    could work on the data presented in pieces (i.e. asynchronously).
    anyway try googling for AJAX...
    regards
    jo

  • Is BPCNW 7.5 supports Time dependent Hierarchies ?

    Hi,
    We are maintaing 4 hierarchies for Profit center dimension. Depends on business structure nodes(profitcenters) will move from one parent to another.
    For e.g:
    In 2009 my PC hierarchy looked like
    RBU1
    -- PC1
    -- PC2
    RBU2
    -- PC3
    -- PC4
    And in 2010, PC2 moved under RBU2, and the hierarchy looked like
    RBU1
    -- PC1
    RBU2
    -- PC2
    -- PC3
    -- PC4
    So, now the requirement is if they want to look at 2009 numbers they would want to see the hierarchy roll up of 2009 and if they look at 2010 numbers, they would like to look at the new hierarchy.
    Is this requirement possible in BPC NW7.5 with out maintaining new hier for 2010.
    thanks in advance...
    regards,
    Raju

    Hi,
    As such time dependent hierarchies are not supported by SAP BPC 7.5.
    This will be deffinately covered in SAP BPC 8.0 release. BPC 8.0 is the major release of SAP BPC NW version.
    Regads,
    Mahesh

  • Bex query-KEY date for time dependent objects

    Hi
    I have one infoobject called 0customer that has one time dependent attribute .called status. I would know how the system works in the following senario for the a given key date(which in bex properties).
    question 1)
    customer todate          fromdate    status
    1            20071231     20070101     Y
    1            20081231     20080101      N
    1            20091231     20081101      X
    can the data in the infoobject be overlapped? is the 3 rd record is  valid in the above example - as months(11&12of2008)  overlapping with second record? ? pls advise
    question 2)
    customer todate          fromdate    status
    1            20071231     20070101     Y
    1            20081231     20080101      N
    1            20091231     20090101      X
    If the keydate is 20080201 which record will it return?would it return the record that has status 'N'?
    what does the keydate is compared against? is it with from date or todate or between fromdate and todate? does the query return only one customer record for a given customer when it runs in the query?
    Please advise.
    Thanks
    Vennela

    1) Normally you cannot activate the data with this constellation. If you have inconsistent master data you can repair with transaction RSRV.
    2) The system returns N for key data 20080201.
    Best regards
    Dirk
    Edited by: Dirk Herzog on Nov 19, 2008 1:16 PM

  • Combining records for time dependent master data

    Good Day,
    We have a characteristic with turned on time dependency for master data.
    Bringing in data from the source generated a number of entries for the master data.
    Here is an example:
    Line 1: [Date 1] - [Date 2]
    Line 2: [Date 2] - [Date 3]
    Line n: [Date x] - [Date y]
    Any thoughts on how we can converge/aggregate Line 1 through Line n for the history, so that we have
    Line 1: [Date 1] - [Date y]...
    and then, going forward we can, use time dependency for any changes to master data that might come up.
    Thank You for your input,
    Dmitriy

    Hi Dmitriy,
    As far as I know, it is not possible, unless you delete the master data and reload.
    I don't think you will be able to delete the master data at this stage, because it will not possible to delete the master data without deleting the transaction data.
    Thanks,
    Krishnan

  • 0CALDAY for time dependent master data lookup unknown when migrated to 7.0

    I am in the process of migrating a number of InfoProviders from the 3.x Business Content to the new methodology for BI 2004s.
    When I try to create a transformation from the Update Rules for 0PA_C01, all of the rules that use a master data lookup into 0EMPLOYEE give me the error such as "Rule 41 (target field: 0PERSON group: Standard Group): Time char. 0CALDAY in rule unknown". 
    How do I fix the transformation rule that is generated from the update rule for these time-dependent master data attributes?

    Hi Mark,
    look at http://www.service.sap.com/. I guess you need to implement some corrections or newer supp-packages.
    kind regards
    Siggi
    PS: take a look: https://websmp104.sap-ag.de/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=941525&_NLANG=EN
    Message was edited by:
            Siegfried Szameitat

  • Validity period merging issue for time dependent master data

    Hello All,
    I am trying to load the data from DSO ZDSO1 to Master data object ZCASE1. Attribute "ZATR1" of ZCASE1 is the time dependent attribute of ZCASE1.
    ZDSO1 contains "Changed On" field which defines the "Valid From" period for attribute "ZATR1" of case ZCASE1.
    For eg.
    ZDSO1 contains below records for Case 'C1':
    Case ID     Changed On ZATR1
    C1              01.01.2014     01
    C1              02.01.2014     01
    C1              02.15.2014     07
    C1              02.17.2014     07
    My transformation from ZDSO1 to infoobject ZCASE1 contains below mapping:
    Case ID - Direct Mapping - ZCASE1 object
    Constant value '12/31/'9999' - VALID TO field
    Changed on - Direct Mapping - DATE FROM field
    ZATR1 - Direct Mappint - ZATR1 object
    After loading the data from ZDSO1 to ZCASE1 below results are obtained:
    Case ID     VALID FROM VALID TO   ZATR1
    C1             01.01.1000    12.31.2013  BLANK
    C1             01.01.2014    01.31.2014  01
    C1             02.01.2014    02.14.2014  01
    C1             02.15.2014    12.31.9999  07
    Time-Dependency is define correctly however my concern is why second and third records were not merged together. Instead of having four records, I should have ideally received THREE records. As shown above, third and fourth record (value 07) from ZDSO1 are merged into SINGLE record in infoobject ZCASE1.
    For the subsequent data, it again does the same thing.
    For eg. If I receive below Delta record from ZDSO1:
    C1   03.01.2014 07
    I get FIVE records in infoobject ZATR1 as shown below:
    Case ID     VALID FROM VALID TO   ZATR1
    C1             01.01.1000    12.31.2013  BLANK
    C1             01.01.2014    01.31.2014  01
    C1             02.01.2014    02.14.2014  01
    C1             02.15.2014    02.28.2014  07
    C1             03.01.2014    12.31.9999  07
    In my understanding, BW system should have merged this Delta record with the last record present in infoobject because both the records have same ZATR1 value.
    I would really appreciate your help/suggestions to understand/resolve this issue.
    Thank You,
    Nilima

    Hey Arun,
    While there wasn't any other time-dependent attribute apart from ZATR1, there is another time-independent attribute ZATR2 of ZCASE1 whose value was changed and hence somehow system was not able to merge the validity range.
    Thank You.
    Nilima

  • Master data records for time dependant data

    Hi
    In R/3. say master data has 1500 records. In BW, while loading this, i get the same number of records in monitor.
    But when i check the maintain master data for this info object, I find each row being duplicated. The difference being the valid to and valid from date. The info object is time dependant.
    So my question is: this adjustment done...is it ok continuing forward or do we change something now so that i dont see duplicate rows?
    Thanks in advance
    AR

    hi,
    everything is ok here (I assume you have timeframes for e.g.: 01.01.1000 - 27.12.2005 and 28.12.2005 - 31.12.9999).
    If you are working on developement system now - change something time-dependent in your master data tommorow (in your source system) and extract delta. Two new periods will be created and you will have 3 records, e.g.: 01.01.1000 - 27.12.2005 , 28.12.2005 - 28.12.2005 and 29.12.2005 - 31.12.9999.
    Regards,
    Andrzej

  • Bex Report for time dependent master data

    Hi Gurus,
    I hav created a report based on a mutliprovider having 1 DSO and 2 CUBEs with has a common characteristics 0SALEEMPLY which is timedependent master data
    it has following records
    Validfrom===== To======== SE == Division
    05.05.2006 ===14.10.2007 == 709== 32
    15.10.2007 ===19.10.2007 == 709== 33
    20.10.2007 === 31.12.9999 ==709 ==34
    In report wen i fetch the data month wise it shud show the division(time dependent) according to its validity in master data
    But in my report it shows division 34 in all the months
    what is wrong here and do i need to hav any restriction at query level ?

    Hello Experts,
    please update

Maybe you are looking for

  • How to remove 10.6.8 system update?

    After Installing 10.6.8 system update, my mac book pro panics randomly. I really really really want to remove the system update. What is the proper procedure for removing a system update? This is beyond annoying!!!!!! Apple is irresponsible to push o

  • Moving "purchased" music from my iPod to my MacBook

    I started with iTunes on my PC, subsequently I purchased a Mac Book and I'd like to consolidate everyting onto it. There has to be a way to transfer all of the songs I've purchased from my iPod to the Mac Book. Or is there? Darned if I can figure it

  • I am planing to do sap-xi certification in siemens hyderabad guid me?

    Hi , I am planing to do sap-xi certification in siemens hyd is it worth or is any plancements in their plz guid me in this reg.......help ful ans reward max..

  • How do I stop iPhoto from synching w/ iPhone?

    Every time I plug in my iPhone into my Mac iPhoto launches and wants to d/l the same pictures I've already d/l'd. Is there any way to stop iPhoto from automatically launching when I plug in my iPhone, but continue to launch when I plug in my regular

  • How Applet pass stack to JNI ?

    I'm preparing a project with J2EE, The client need to call C++ Dll (hardware drive), for some reason the App need pass stack to the C++ Dll. When I write the Java Application and set the VM parameters: "-Xss4m" the program run OK!. If do not set the