Time depend hierarchy of 0profit_ctr (set calday on EXIT_SAPLRSAP_004)

Hi,
I would like to set Time depend hierarchy (not by nodes, but all hierarchy) on the 0profit_ctr. but unfortunately, 0profit_ctr is not time depend. So I would like to add calday on the EXIT_SAPLRSAP_004(cmod) on the source system.
But I am no idea how to code it...
what I would like to do is to set DATETO and DATEFROM of the hierarhcy header.
parameter of the  EXIT_SAPLRSAP_004 is below.
*"       IMPORTING
*"             VALUE(I_DATASOURCE) TYPE  RSAOT_OLTPSOURCE
*"             VALUE(I_S_HIEBAS) TYPE  RSAP_S_HIEBAS
*"             VALUE(I_S_HIEFLAG) TYPE  RSAP_S_HIEFLAG
*"             VALUE(I_S_HIER_SEL) TYPE  RSAP_S_HIER_LIST
*"             VALUE(I_S_HEADER3) OPTIONAL
*"       TABLES
*"              I_T_LANGU TYPE  SBIWA_T_LANGU
*"              C_T_HIETEXT TYPE  RSAP_T_HIETEXT
*"              C_T_HIENODE TYPE  RSAP_T_HIENODE
*"              C_T_FOLDERT TYPE  RSAP_T_FOLDERT
*"              C_T_HIEINTV TYPE  RSAP_T_HIEINTV
*"              C_T_HIENODE3 OPTIONAL
*"              C_T_HIEINTV3 OPTIONAL
*"              C_T_MESSAGES STRUCTURE  BALMI OPTIONAL
*"       EXCEPTIONS
*"              RSAP_CUSTOMER_EXIT_ERROR
I guess I_S_HIER_SEL seems to me the hierarhcy header. but I could not find which fields of the TABLES are corresponding this hierarchy header.
Or is it impossible to set what I want to do on this exit?
Hope your help..
Kind regards,
Masaaki

Hi,
In this FM EXIT_SAPLRSAP_004..
see include program...
INCLUDE ZXRSAU04..
Write code
data : l_s_[structurename] like [extractstructure name],
l_tabix like sy-tabix.
case i_datasource.
when 'your datasource name'.
loop at c_t_data into l_s_[structurename]
l_tabix = sy-tabix.
fill the new field
select ... into l_zz...
where ....
l_s_[structurename]-[new field name, zz....] = l_zz...
modify c_t_data from l_s_[structurename] index l_tabix.
endloop.
Hope this Help.. assign points...
regards,
raj

Similar Messages

  • 0CS_Item with time-dependent hierarchy

    Dear Experts,
    we are discussing pros and cons for a time-dependent item catalog (characteristic 0CS_item with time dependent hierarchy in BW) within consolidation SEM BCS 4.0. Does anybody has experiences on this topic?
    I am quite sure it will be a performance issue and it means additional reporting effort (e.g. using reference period/year in the report comparing different hierarchies).
    I am not sure if there are any other risks so I it would be great if anybody has some hints.
    Thanks in advance,
    Birgit Laux
    Message was edited by: Birgit Laux

    Birgit,
    Some other things to consider:
    - frequency of changes to item hierarchy. Could lead to a lot of item hierarchies in BW over time.
    - hierarchy validity date does not seem to be displayed when running web queries and thus makes it difficult for the user to select the correct hierarchy when executing the query. Still looking for a fix for this.
    - greater complexity in overall design. Is it really necessary to achieve correct financial statement presentation?
    Virtual cube performance is not great but you could implement the data mart which provides typical BW query performance.
    I stayed away from setting the item as time dependent for these reasons.
    Brian

  • Creation of Time Dependent Hierarchy in R/3

    Any ideas on how to create a time dependent Hierarchy in R/3?
    Do we have any existing functionality we can leverage in R/3 for creating and maintaing time dependent hierarchy or through ABAP coding in R/3?
    Any ideas or documentation will be helpful.

    Hi Jasmine,
    check this documents/links to get an idea how to set up hierarchy extractor in R/3
    [How to Create a Hierarchy Extractor for Employees and their Department Managers|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20a709c1-0a8e-2a10-21b4-f779728c63bf]
    Re: Build Hierarchy with ABAP
    How to create datasource for hierarchy
    Double post: Creation of Time Dependent Hierarchy in R/3
    Regards
    Andreas

  • 0ORGUNIt time dependent hierarchy not showing all valid nodes in BO , but in BW its correctly shown

    Hi All,
    We have 0ORGUNIT hierarchy shown in one of the Webi reports. 0ORGUNIT is time dependent hierarchy.
    In BW report we can see below nodes for hierarchy
    Hierarchy                     Valid From         Valid To
    Z05 Root Company        01.07.2013        31.12.9999 - Parent node
        Z05 Branch 2                 01.10.2013        31.12.9999 - Child Node
        Z05 Division                   09.12.2013        31.12.9999 - Child Node
    In BO webi we can see only two nodes
    Z05 Root Company        01.07.2013        31.12.9999 - Parent node
           Z05 Division                   09.12.2013        31.12.9999 - Child Node
    Any idea why in BO webi the other node is not shown ? This is happening only for time dependent hierarchy and only in BO not in BW.
    Thanks,
    Shraddha

    Hi Shraddha ,
    Check at webi query panel level any restrictions applied to hierarchy levels.
    Check at BEx query level,select 0ORGUNIT ,hierarchy -Expand to level .
    Here specify Max level.
    lastly, check any filters/restrictions applied on data.If yes,remove restrictions.

  • Time dependent hierarchy structure in SEM-BPS

    I want to use a time dependent hierarchy structure in sem BPS to make combination chek and proposal in a layout.
    I have manage a relation of type hierarchy (based on this hierarchy) in the characteristic relationship tab page of my planning area.
    I open my layout to make entries in the future (next fiscal year) but the system doesn't propose me the datas valide for the next fiscal year in my hierarchy but the datas validate today.
    There is a key date in the master data tab page of the planning area but it seems to have only effects on attributes with validity dates but not with hierarchy with time dependent hierarchy structure.
    Thanks for your help.

    Hi,
    The key data that you enter in the planning area is only for time dependent characteristics and attributes. For the hierarchies in the characteristic relationships the current data is used.
    If you still want to use a time dependent hierarchy for modeling the characteristic relationships you could use a characteristic relationship type exit. In the exit you can read the hierarchy with the proper date.
    Best regards,
    Gerd Schoeffl
    SAPNetWeaver RIG BI EMEA

  • Time-Depended hierarchy and BEx-Queries

    Hi Gurus, Masters,
    I have ONE time-depended hierarchy for 4 periods (times):
    1, 2, 3, 4
    I have 4 columns in Query with 4 periods:
    1 col for 1 period,
    2 col for 2 period,
    3 col for 3 period,
    4 col for 4 period.
    I have 1 row with this hierarchy.
    How can i share this hierarchy in my columns by validity:
    for 1 col -> this hierarchy for 1 period,
    for 2 col -> this hierarchy for 2 period,
    for 3 col -> this hierarchy for 3 period,
    for 4 col -> this hierarchy for 4 period?
    Any answer will be very appreciated.
    Thank you.
    Is this possible?
    P.S.
    I have 2 solutions found.
    Message was edited by: AndyML

    Hi Shashi,
    One of the ways:
    Create a variable type customer exit - in properties of the IO - in the 'select hierarchy' window there is a 'Variables' checkbox for key date.
    Calculate the last date of the entered period/year in the exit.
    Best regards,
    Eugene

  • Time Dependant Hierarchy in BEx

    Hi All,
    I have created a query on top of 0PS_C04.
    In my master 0Project i have a hierarchy which is being displayed through BEx.
    Now with every new fiscal year, new projects are added to the hierarchy.
    When I run the query then all the projects of the hierarchy are displayed irrespective of the year they belong to.
    My problem is that I want to display only 2009 related projects when i execute the report for 2009 and so on for the years that follow.
    Can somebody please suggest a way out???
    Thanks.
    Regards,
    Rohit

    Hi,
    Are you using option : Time dependent hierarchy or Entire hierarchy is time dependent. If it's the latter, then you can just restrict your query with the hierarchy having end date 31.12.9999. Using key date option is also convenient.
    --Akashdeep

  • Time dependent hierarchy creation in R/3.

    I know  you can do it in BW. Any ideas on how to do it R/3? Do we  have any existing functionality we can leverage in R/3 for creating and maintaing time dependent hierarchy.
    Any ideas or documentation will be helpful?

    Hi,
    check this threads:
    Custom Datasource for custom Hierarchies
    How to create Hierarchy data sources in R/3
    How to create a hierarchy datasource in R/3
    Double post: Creation of Time Dependent Hierarchy in R/3
    Regards
    Andreas

  • BPC 10.0 - Time Dependent Hierarchy?

    Dear All,
    In BPC 10, is time-dependent hierarchy allowed/used?
    Any pointers will be appreciated.
    Thank you!
    Regards,
    Peri

    Hi Peri,
    Please, read here: Time dependent hierarchy with BPC10 NW - Planning and Consolidations Use cases
    B.R. Vadim

  • 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

  • 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

  • Time-dependent hierarchy in query selection screen

    Hello all
    I am running query where input selection has following fields -
    Fiscal year variable ( e.g. i can enter 2008)
    Period variable ( e.g. i can enter 12)
    Hierarchy Node variable
    The hierarchy is time-dependent. I want that if I enter year and period as 2008 , 12 then
    my hierachy node selction pop-up should show me only that hierarchy structure which was valid in 12.2008.
    But my hierarchy selection always shows me hierachy structure that is valid on current date.
    Can anyone help me on how to achieve this?
    I have already coded keydate variable based on fisc year and period. But then how to make use of this key date variable so as to get correct selection of hier?
    Regards,
    Sanjyot

    Hi Marcio
    RSRHIERARCHYVIRT is for maintaining time-characteristics hierarchy.
    My hierarchy is based on Consolidation Groups and Units.
    But the hier is time-dependent.
    So I want that when selection pop-up opens for a hier node , it should show me correct hier depending on year and period i have enetered.
    Regards,
    Sanjyot

  • Selection of time-dependent hierarchy variables after selection of time

    Hi guys,
    I'm having the following question regarding the selections of variables in a BEx Query:
    I need to select e.g. a position out of a hierarchy which is time-dependent. In the selection screen I'm only able to select a certain date but not the key date that I need for the hierarchy. Now I would like to replace the needed key date for the hierarchy out of the date value. Having the parameters for the hierarchy selected I would like to select a position of the right hierarchy.
    My idea is to select the date first:
    Date: 05.2009
    In the next pop up window the hierarchy key date is replaced by the date:
    Date: 05.2009 --> key date: 05.2009
    Now I can select a position for the right hierarchy.
    Is a two-stage selection possible? How can a variable be replaced and simultaneously serve in the selection of object with a hierarchy?
    Thanks in advance!

    Hi Partho,
    Please check this link. Might be helpfull.
    http://www.ibm.com/developerworks/data/library/cognos/infrastructure/cognos_specific/page551.html
    Regards,
    Rahul

  • Select key date of time-dependent hierarchy before select a hierarchy node

    Hello experts!
    I have a Web Application which has a selection on 0ORGUNIT (organizational unit). The selection is on hierarchy nodes and the hierarchy is time-dependent.
    Because of the time-dependency I have to give a key date for the hierarchy. But I want to select the key date at runtime/execution of the query and additionally I want to select the hierarchy node and other selection criterias.
    Maybe there is a solution to get all this in one pop-up or maybe in two or another solution how I can implement this requirement.
    Thanks for help!
    Peter

    Hey!
    You don't have to use the same presentation-hierarchy like  the selection-hierarchy is which you use for the variable. While presentation-hierarchy always has a key-date, the selection-hierarchy has none. So you see all values for selection but just this which are valid for the presentation-hierarchy are selected. And there is a warning which you can supress over RSRT.
    This solution works for our problem, maybe not for yours, don't know.
    Best regards,
    Peter

  • Time Dependent Hierarchy for Cost Center

    I have searched the entire SDN for this so any help would be really appreciated.
    I am a BI consultant and I am trying to look around for the exact steps on how to make a Cost Center Hierarchy "Time Dependent" in ECC system.
    I am aware of changes to do in BI system but there is no way that I can know what needs to be done in ECC side since we dont have any FI Consultant to help us. All the posts show that there is something to be done on ECC but it seems even no body is sure on what to do.  I think the hierarchy is created in KSH1.
    Please provide any documentation or exact steps on how to do it. I will assign full points to the correct and precise answer.
    Regds
    Girish

    Hi,
    Creation of cost centre:
    Path: Accounting  Controlling  Cost centre accounting  Master data  Cost centre  Individual processing  Create (T. Code KS01)
    Cost centre: Dept A
    Valid from: 01.04.2009 to 31.12.9999
    Enter
    Name: Dept A
    Depart Cost centre: Department A
    Person responsible: A
    Cost centre category: 1 (Production)
    Hierarchy area: XXXXXX
    Business area: XXXX
    Currency: INR
    Save (or) (Ctrl + s)
    Ignore the warning message, press enter
    Cost centre: Dept B
    Valid from: 01.04.2009 to 31.12.9999
    Reference cost centre: Dept A
    Controlling area: XXXX
    Enter
    Name: Department B
    Description: Cost centre department B
    Basic data
    Person responsible: B
    Save (or) (ctrl + s)
    Ignore the warning message, press enter
    Cost centre: Dept C
    Valid from: 01.04.2006 to 31.12.9999
    Reference cost centre: Dept A
    Controlling area: XXXX
    Enter
    Name: Department C
    Description: Cost centre department C
    Basic data
    Person responsible: C
    Save (or) (ctrl +s)
    Ignore the warning message, press enter
    Creation of Cost centre group:
    Path: Accounting  controlling  Cost centre Accounting  Master data  Cost centre group  Create (T. Code KSH1)
    Cost centre group: XXX Produ
    Enter
    XXX Produ u2013 Production department for Co. area XXXX
    Select insert cost centre button (Shift + F4)
    Give the cost centre: Dept A, Dept B
    Save
    Hope It will clear.
    Regards,
    Kishore K
    Edited by: kishore babu on Nov 12, 2009 1:14 PM

Maybe you are looking for

  • Delivery based on qty specified in delivery schedule in Scheduling Agreemnt

    Hi, We have a scenario where we need to create delivery based on the quantities entered in the delivery schedule in Scheduling Agreement, eg. on 10.11.2011 qty to be delivered is 10 on 15.11.2011 qty to be delivered is 20 We have sufficient stock and

  • Problem with Business Explorer 7.0?

    Hi, I have installed SAP GUI 7.1 and BI 7.0 Add on. When I tried to open Business  Explorer after opening this screen, when I am trying to open the queries  here it was showing the language is German. I am not able to open the queries in Business Exp

  • Image actionscript question

    I have created an new Image using actionscript var img:Image = new Image(); img.source = images[imageViewer.horizontalScrollPosition].source; img.maintainAspectRatio = true; img.scaleContent = true; img.autoLoad = true; I am trying to find out how to

  • Funkeln, leuchten Effekt in Photoshop Elements 4

    Hallo, ich würde gerne einen silbernen Schriftzug auf schwarzem Hintergrund "zum funkeln bzw. leuchten bringen", um ein Image von Exklusivität zu vermitteln. Wer weiß wie man solch einen Effekt erreicht. Ich arbeite noch mit Photoshop Elements 4 und

  • Creating 'walls' quickly and precisely in Illustrator

    Hello there. I'm a 3D artist but recently, due the high demand, I'm learning illustrator for the sole purpose of making floor plans (the artistic colorful ones), I know Photoshop very well and use it extensively, it would certainly be enough if I was