How to: from time independent hierarchy to time dependent hierarchy in BW

Hello goeroes outthere,
I am facing the following problem and was wondering if some of you have faced the same issue.
In ECC we have a time independent hierarchy on Profit Center. Our customer wants to perform time DEPENDENT reporting in BW.
As the standard datasource does not support to be loaded via PSA in the datasource definition (only IDOC) we cannot enhance the datasource with fields such as DATEFROM and DATETO. I've tried doing so but this results in the following error message when loading : Selected number does not agree with transferred number of records.
So I have cancelled out this as being an option.
I am analyzing the following two options :
1. Making the hierarchy time dependent. (globally). The idea would be to create a custom ABAP program that would copy the loaded hierarchy to a hierarchy in which we define the datefrom as the actual system date and the dateto as 31.12.9999.
Prior to doing so the abap program should change the already loaded hierarchy by modifying the dateTO as actual system date -1 in the header of the hierarchy.
In theory this seems to be a good option, but I am afraid of the complexity of the ABAP program to be created by looking in debug how the copying process is handled in SAP. 
2. Making the hierarchy structure TIme dependant. THis has as a consequence that the table  /BI0/HPROFIT_CTR is adjusted to include DATETO and DATEFROM fields. A custom program could read the entries and perform the same activities as described above. So meaning finding and modifying the existing entries with DATETO fields with as an entry 31.12.9999 to adjust to sysdatum -1 and modfying all entries that don't have dateto and datefrom entries by putting datefrom (=sysdate) and the dateto (=31.12.9999).
The issue here is that first we need to find the link between the hierarchy ID and the Hierarchy loaded and that I am not sure how SAP will deal with this SID wise.
Option 1 seems feasable as the hierarchy does'nt change every single day and doesn't require to be loaded every single day. But before going in this direction, I would appreciate some confirmation of my approach.
Thanks in advance for sharing your lights on this topic.
Rgds,
Bvpe

Hi Bart,
I just solved this very problem today in a two step process:
In our implementation, we only want to control when a new version of the hierarchy is created.  If nothing changes, whatever is brought in from the source system will just replace the current version.  We imagine we'll only create versions at month end or major re-organization.
1) I created a Select Options variable in tcode: stvarv called ZPROFCTR_FROMDATE.  I added a value to the low position and set the option to equals.
2) Open the infoPackage that is used to load the hierachy from the source system.  Go to the Hierarchy Selection Tab and click on the button at the bottom of the tabbed frame "Dynamic Hierarchy Selections".
You should see two check boxes, place a check in the second box: "Determine Using Routine"  Click on the create icon and put this in the routine
  p_s_sel_hier = l_s_presel_hier.
  data: tempfrom type tvarv_val.
  select single low
  from tvarvc
  into tempfrom
  where name = 'ZPROFCTR_FROMDATE'.
  move tempfrom to p_s_sel_hier-datefrom.
  p_s_sel_hier-dateto = '99991231'.
  clear p_subrc.
I've include the entire subroutine for context, and so you can see the SAP generated coments in the form that attempt to explain what the form is going to do.
Long story short, the hierarchy you have selected with the radio button on the Hierarchy Selection tab will be the one that is affected by this logic.
form compute_hier
  tables l_t_all_hier structure rshiertrsf
  using l_s_presel_hier like rshiertrsf
        l_infopackage   type rslogdpid
  changing p_s_sel_hier like rshiertrsf
           p_subrc like sy-subrc.
*Insert Source Code to decide which Hierarchy shall be loaded.
*The Hierarchy you select from table l_t_all_hier and fill
*into p_s_sel_hier will be loaded.
*The Structure l_s_presel_hier contains the pre-selection of the
*BW-Scheduler - just to inform you what the BW wll load
*if you change nothing.
*$*$ begin of routine - insert your code only below this line        *-*
  p_s_sel_hier = l_s_presel_hier.
  data: tempfrom type tvarv_val.
  select single low
  from tvarvc
  into tempfrom
  where name = 'ZPROFCTR_FROMDATE'.
  move tempfrom to p_s_sel_hier-datefrom.
  p_s_sel_hier-dateto = '99991231'.
  clear p_subrc.
*$*$ end of routine - insert your code only before this line         *-*
endform.                    "compute_hier
Hope this helps,
Quack

Similar Messages

  • Load Time Independant Object to Time Dependant Object

    This is a common situation in a data warehousing environment were the time dependacy of an object (master data or Hierarchy) is not maintained in the source system but needs to be maintained in the DW system.
    Lot other ETL tools automatically provide the SCD type-2 functionaly which automatically makes the previous record in the DW system as a old record and update the "SCD to-date" field either system date - 1(day or sec) and inserts a new record with "SCD From-Date" as system date when ever an attribute that we are tracking for "SCD type-2" changes value which is different from the value that is present in the DW.
    Can we achieve the same in BW? Please let me know.

    The 'to-date' of existing record is adjusted by BW when you are changing the attribute with a different  (or overlapping) 'from' date. Following is what SAP says in online help
    "Master data must exist between the period of 01.01.1000 and 12.31.1000 in the database. When you create data, gaps are automatically filled. When you change or initially create master data, in some cases, you must adjust the validity periods of the adjoining records accordingly."
    I think 12.31.1000 is a typo and it meant 12.31.9999.
    You may follow this at http://help.sap.com/saphelp_nw04/helpdata/en/04/cce63736544d4de10000009b38f8cf/frameset.htm
    It may not exactly be the same as what you describe in other ETL tools.

  • How the files are decreasing from RBS storage after some time i delete docs from document library, where shld I check the settings for this?

    HI
    I created a web application and configured  rbs storage ,
    I uploaded documents (for ex: 18 number)
     after uploaded  documents ,  and observed the RBS storage folder, number of files are increasing (39 number) , its working fine
    and also  I run the querys to check the rows increasing or not , (when I upload new doc rows are increased its fine also)
    select count(*) from alldocs
    Select count(*) from AllDocstreams
    but when I delete some docs from document library ,
    1)the doc itself deleted from document library
    2)when I check the rbs storage  there is no number of files are decreased(its still 39 files ), its same as  before doc deleted from doc library
    after some time I found the number of files are decreasing from RBS storage folder in sql server,
    here I want to know the how the files are decreasing from RBS storage  after some time, where  shld I check the settings for this? and how I control on it
    here how I know the settings for cleaning up orphan BLBOS how  these deleted BLOB
    adil

    1. WHen you delete the file from Sharepoint, it is still present in Recycle bin. This is a default setting in sharepoint for 30 days. Once files are deleted fro Recycle bin, it can also be delete from RBS
    2. There is a RBS cleanup job which deletes files from RBS. for more info check 
    http://mehuljamod.blogspot.in/2012/09/remote-blob-storage-maintainer-rbs.html

  • How do you stop the 11.0.44 version from freezing up all the time?

    How do you stop the Itune version 11.0.44 from freezing up all the time. I have two different lap tops with the same version and both do the same thing. The store gives me the most problem.

    Hello rkalanz1,
    The following article should be helpful in stabilizing iTunes on your laptops.
    iTunes for Windows Vista or Windows 7: Troubleshooting unexpected quits, freezes, or launch issues
    http://support.apple.com/kb/TS1717
    Cheers,
    Allen

  • How do I transfer data from one time capsule to new time capsule when TC backs up an iMac and Power Book

    How do I transfer data from one time capsule to new time capsule when TC backs up an iMac and MacBookPro

    It is generally better to leave the old backups and start again.. unless there is something you particularly need.
    But if you desperately want all the old backups you have to copy the sparse bundles.. this will take very long time as it must copy via the computer..
    http://pondini.org/TM/18.html
    Take particular note of the initial comments.. ie before you read how to do it.. don't do it.

  • How to create a variant to a report from another program at run time

    Hi experts,
                   when i am using FM  :  /OSP/REPORT_CREATE_VARIANT to create a report variant from a program then i am getting  an error 'For object /OSP/ERPNR , number range interval 01 does not exist ', how should i avoid it or can any one help me out to create a report variant from another program at run time with the results of the program.so that i can execute the report from here with this variant

    If i understand you,
    - You can use a FM like [RS_CREATE_VARIANT|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=rs_create_variant+&adv=false&sortby=cm_rnd_rankvalue] to create a variant and then use it in the [SUBMIT|http://help.sap.com/erp2005_ehp_03/helpdata/EN/fa/096d67543b11d1898e0000e8322d00/frameset.htm] statement USING SELECTION-SET.
    - But you may also use SUBMIT with WITH parameters which doesnt require variant creation and with much less programming efforts.
    - You can mix the two solutions also.
    So what is you actual requirement, also look at some documentation like [ Scheduling a Job: Full-Control Method|http://help.sap.com/erp2005_ehp_03/helpdata/EN/fa/096ce5543b11d1898e0000e8322d00/frameset.htm]
    Regards

  • How to download 'all photos at a time' from shared stream?

    I have a photo stream shared album (with 120 pictures) on icloud.  This is shared from iPhone.  I opened the link on my mac/windows in the browser.  Now, how to download 'all photos at a time' from shared stream?  I don't want to download each photo at a time.  There are 100s of photos to download.  I can't open one photo at a time and keep downloading them separately.  There should be a way to download all photos from a shared stream.  Please let me know how you are dealing with this?

    1.you need create a dba user in your database
    2.you can run the script as command
    eg. use PL/sql developer ->new command window->open script-> run.

  • I downloaded music to my iphone and when I went to go sync it up to itunes, I lost all of the songs purchased from that time until the previous time I backed it up. How do I recover these purchased songs that have been lost?

    I downloaded music to my iphone and when I went to go sync it up to itunes, I lost all of the songs purchased from that time until the previous time I backed it up. How do I recover these purchased songs that have been lost?

    All of your music should be in itunes on your computer.
    Select it to sync and sync.

  • How can I print the date and time in a photo from iPhoto

    How can I print the date and time in a photo from iPhoto

    You want to print them on their own? Can't be done. WIth the photo? Install this
    http://www.iborderfx.com/iborderfx/

  • QuestionJust purchased a USB Super Drive but unsure how to use it - o instructions provided apart from how to eject a cd.  Each time I put in a cd it just ejects it again.

    Just purchased a USB Super Drive but unsure how to use it - o instructions provided apart from how to eject a cd.  Each time I put in a cd it just ejects it again.Can anyone help.

    USB is rarely bootable under Mac OS X and PowerPC Macs.   Get a Firewire Superdrive from http://www.macsales.com/ if your intent is to boot the machine.   PPC, which is PowerPC, indicates the Mac predates 2006.

  • How can i design square signal which having a positive and negative values equal to each other and separated from each other by controlled time or distance

    How can i design square signal which having a positive and negative values equal to each other and separated from each other by controlled time or distance, As it is shown in the figure below. and enter this signal in a daq.
    Solved!
    Go to Solution.

    By the time you spend for the nice diadram you might have done the vi
    Your DAQ like to have a waveform (array of values and dt ak 1/samplerate)
    If you set the samplerate you know the array length , create a array of zeros, and set the values of both amplitudes ... 
    Since I don't want to wire others homework here are some pictures
    And there are some drawbacks is room for improvement in my solution, just think of rounding errors ... and what might happen if the arrays get bigger ....
    Spoiler (Highlight to read)
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • How do I obtain the answers to my security questions if I am attempting to download purchase from iBooks for the first time?

    How do I obtain the answers to my security questions if I am attempting to download purchase from iBooks for the first time?

    Click here for information. If you've forgotten the answers to the security questions and can't get them emailed to you for some reason(the email may take a few hours to arrive), contact the iTunes Store staff via the link in that article.
    (85504)

  • HT201493 How do I get my old apple ID/email from popping up and asking to verifie it's getting annoying? I've change everything to my new email an my old one keeps popping up please help me stop it from popping up all the time?

    How do I get my old apple ID/email from popping up and asking to verifie it's getting annoying? I've change everything to my new email an my old one keeps popping up please help me stop it from popping up all the time?

    Did you change the ID you are using for iCoud?  If so, did you delete the account, then sign back in with your new ID on your device?

  • How can I change the appearance and text on 'Continue from where you stopped last time?' dialogue

    Hi,
    I would like to change the appearance (color, header and text) of the 'Continue from where you stopped last time?' dialogue
    Could you please help me where to find the files to be edited and how to do so.
    Thanks in advance for your help!!!
    Stephanie

    Hi Stephanie,
    Unfortunately there is no way to change the text or appearance of this dialog box. You are stuck with it as is.
    www.cpguru.com - Adobe Captivate Widgets, Tutorials, Tips and Tricks and much more..

  • How to achieve time dependent hierarchy in SAP BO Disclosure Management

    Hi all experts,
    We are proposing a SAP EPM solution to a client. The overall solution consist of a planning tool (BPC 10 NW) and a disclosure management tool (SAP Disclosure Management 10).
    The Disclosure management tool will retrieve the planning budget figure from BPC 10 NW, and consolidate into a financial statement.
    Understand that in SAP BPC 10 NW there is a new feature call "Time Dependent Hierarchy" which allows defining the hierarchies based on a time range and the roll up behavior will be different based on the time the data belongs to. However in Disclosure Management it is currently not supported as a standard feature, therefore is there any workaround solution to achieve time dependent hierarchy in disclosure management ?
    Thank you !
    Regards,
    Elvin

    Hi Elvin, did you get a solution to your question.
    Can you share it. Thanks

Maybe you are looking for