Cost Allocation Query

I want to allocate cost in top down approach via SQL i.e user input should be 1.Expense amount for node 1 (which need to be allocate
in lower nodes) 2. Percentage of allocation for each nodes
Node 1
Node 2 node3
node4 node 5 node 6 node 7
if node 1 gets 100 $.then it should get allocated in node 2 and node 3 in 40-60%(User input). also it should get allocated further in node 4 and 5 basis user input percentage and also in node 6 and 7.

Can you supply a script  (CREATE TABLE.... INSERT INTOs...) for quick assistance?  Thanks.
Kalman Toth Database & OLAP Architect
SQL Server 2014 Design & Programming
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

Similar Messages

  • Cost allocation without a fixed %

    Hi SAP Gurus,
    I have a peculiar query. My client would like to allocate costs (in Controlling) on varying percentages every period. For example on the basis of the % of COGS to Sales of the products. Though the method of calculating this % will stay the same, the percentage per se will change every period.
    Can this be done in SAP Controlling?
    Thanks & Regards,
    Sangeeta

    Hiya,
    Can you look at this thread please? It will save me some work typing the whole thing here again:
    Cost allocation - Urgent
    Cheers.

  • Cost of query

    Does the cost of query depends on the number of rows in the table?
    Also does the cost change from database version to version,
    like if i check the cost of query in oracle 8i and if i check same
    query in oracle 9i, will there be any difference in the cost of query?

    Yogesh,
    All pedantry aside, the cost does broadly reflect the resource consumption associated with a given query. Accessing a greater number of rows will usually result in a greater cost. And yes, the cost may change greatly from one version of the database to another. Up through 9i the cost was meant to reflect i/o consumption. As of 10g it reflects both i/o and cpu consumption.
    However, you probably can't do anything useful with the cost and it can in fact mask problems. Here's one reasonably common problem. You have a staging table into which you load data before processing it. You gather statistics when the table is empty, and then load several million rows into it. Now the optimizer associates a very low cost with fetching data from the table. It will generate queries with very low costs that involve repeatedly reading the entire contents of the table. These queries will perform miserably.
    The solution is to gather statistics on this table after loading it. At this point appropriate plans will be generated that perform well. The cost of these queries will be much larger than the cost of the old queries that performed miserably.
    And in all of the above I'm being terribly simplistic. I use the cost as follows: when I see an execution plan with a substantially lower or higher cost for a given step than makes sense when compared with the other steps in the plan then I assume that the optimizer does not have enough information.

  • Add "cost center" query to a start condition?

    Hi there,
    we got a new requirement for one of our plants.
    We're on SRM 5.0 classic scenario.
    Is it possible to add a "cost center" query to a specific start condition (SWB_PROCUREMENT) of a workflow?
    E.g. if a user uses cost center 4711 for a shopping cart item a specific cost center responsible xyz should approve this item.
    If the user uses another cost center 4712 for a second item in this shopping cart this item should be approved by another cost center responsible abc.
    Is that somehow possible ?
    So far I did not find a suitable expression for cost center.
    Thanks in advance for your answers.
    Best regards,
    Henning

    Hi Masa,
    thanks for your answer. Perhaps you also have a hint for the following:
    I can't really find in the metioned thread or in note 731637 what happens if a SC with several items is partially approved.
    Example:
    SC with 3 items:
    item 1 cc 1000
    item 2 cc 2000
    item 3 cc 1000
    Let's say item 1+3 have been approved by the approver found by badi and WS14500015. Is a PO or a purchase requisition created in backend? Or is it only created after the whole SC has been approved (i.e. also item 2).
    Thanks for a hint and best regards,
    Henning

  • Msg. error BK048 for manual cost allocation

    Hi,
    we got a warning message for manual cost allocation (KB15N), when posting this allocation just with a quantity and without an amount. We would like to post this allocation without amount and therefore need to change the message type from warning (W) to information (I), to do this posting.
    When using transaction OBA5, there is just a fixed and not adjustable value for Standard with "W". Do you know any workarounds or how we can change this message type to do this posting?
    Regards
    Florian

    Hi Florian,
    HAve you assigned users in OBA5?.
    Go to OBMSG, for this particular Message number in the allowed message types, specify IWE etc. In the standard column specify I. Also you could check on check box "Switch Off" if you want to have the option of not seeing the message at all.
    Now goto OBA5, against the message number, in the "Online" column , specify I or - (Switch Off) and do the same in the BAtchl column also.
    Now you need too specify a user only if you want this change for specific users , if you want all the users to be able to post manual cost allocation then do not specify any user name.
    Do tell me if it works.
    Regards
    Susan

  • Cost allocation flexfield

    hi
    after reading payroll UG, i am a bit confused about cost allocation flexfield for payroll, assignment, element link, org,element entry.
    can i consider this flexfield as a T ledger, the first popup field is for Debit, the second one is for Credit purposes, when they are used for those 5 sections?

    the payroll - org - element entry - assignment - element link are levels at which you can define to show a segment or not.
    In case a segment is specified at a higher level, it is inherited from the other levels, so an end user has not to enter all the data all over again. (like a waterfall)
    The most detailed level is the element entry level. Imagine if the end user must enter there for each segment and for each segment all values. Too much work and too error prone.
    So you can set values for a specific segment at a specific level (example company code at payroll level).
    Costing then rolls up all levels to fully qualify all the segments.

  • Multiple Cost Allocation Structures in Single Business Group

    We are curently looking at solution design of creating multiple Cost
    allocation flexfield in single business group environment.
    Purpose :
    Based on organization structure (18 companies) , the finance
    consultants proposed multiple COA structures with different
    valuesets , wherein values sets will be specific to the companies .
    This was suggested inorder to aviod tedious job of defining
    validations and post production support.
    This has impact on payroll solution design wrt to cost allocation FF ,
    where in we have to define multiple structures to map to Accounting
    FFs.
    Woudl like to check if oracle payroll supports this kind of setups.
    Note :The implementation is for UAE localization.
    Rgds/Lavanya

    If Finance System has multiple COA structures with different valuesets , wherein values sets will be specific to the companies then they will seperating cosing on Various OU Level.
    As my understanding, you have to create multiple Business Group as per multiple COA structures .
    Thanks

  • Cost allocation issue

    Hi,
    while doing Partial GR/IR i am getting below error message in Migo.
    " Cost allocation document was not posted due to enter an amount."
    Regards
    My

    Hi,
    Question is not clear.Can you clarify which message type and short error message.
    Regards,
    Sreekanth

  • Reg. Document type for cost allocation

    Hi,
    Please let me know where can maintain document type for cost allocation so documents get post in GL.
    With best regards
    Praveen Atmakuri

    Hi Praveen
    Can't recollect fully, but please check the FI/CO real time recon variant   Or may be the controlling area in okkp
    Simply activate the real time reconciliation and carry out a cross profit center allocation. Either system will trigger the posting in FI or give you error for missing doc type
    Br. Ajay M

  • Landed Costs Alloc. Account

    Hi Dear;
    which account i have to choose for the Landed Costs Alloc. Account?
    is it the real account in the chart of account (expenses account) like insurance or shipping or its a stock expenses account?
    could you send me an example for the JE:
    1- that generates the Landed cost
    2- the Normal insurance or shipping accounts
    best regards;

    You may check this thread:
    Landed costs
    Thanks,
    Gordon

  • Tcode for mass upload of cost allocation?

    Hi all,
    I would like to get a transaction code that will allow me to run a mass upload of cost allocation?
    I tried  ZFR_COST_ALLOC but the system didnt accept it.
    Please help.
    Boubacar-Issa

    look https://forums.sdn.sap.com/click.jspa?searchID=641178&messageID=2895219
    A.

  • Change in Cost Allocation Flexfield

    Hello,
    Client is currently using HRMS for the past one year. Now we need to make a small change in the Cost Allocation Flexfield structure. How will this affect the past data. How can we address this scenario. I seek your expert advise to handle this effectively.
    Regards,
    Jeeves

    Hello Gaurav,
    We're trying to change the value of a segment from 4 digits to 5 digits. We want to update the existing values. Is this possible from the back end.
    Regards,
    Jeeva

  • Common cost allocation to assets in service at different times

    Hi,
    My client constructs large assets that typically go into service over a period of several months. They track some asset costs on tasks assigned to a grouping level of specific assets, while other "general" costs are coded to a task assigned to a grouping level of "Common costs". The problem is that when one of the assets gets placed into service, all of the "common" costs get allocated to that assets. This is resulting in disproportionately larger asset costs for the first one placed in service and a smaller share of those costs allocated to the last asset placed into service.
    What is the best method to get these general-type costs to allocate proportionately across all the assets even though they are placed in service across several different months?
    Thanks!

    Hi
    The problem of equal prorating the common costs is that task may still incur costs after the first asset has been placed in service. The other assets will also incur additional costs.
    You may consider holding the common cost till the end of the entire project. That task should not be assigned to common cost, but instead assigned it to a separate asset, with quantity of 100 units. When project is completed and all other assets are placed in service go and interface the "common" asset lines to FA.
    In Mass Addition split that last asset into separate N assets, where N is the number of real assets generated from that project. Now add the cost of the last "common" assets to the other assets already in FA.
    Dina

  • Cost Allocation Using BADI

    Hi,
    I have to do cost allocation using BADI.
    shall I use UJ_CUSTOM_LOGIC for this if not then which BADI should I use?
    Can anyone provide me the sample code for this. (BPC version is 10)
    I am totally new to BPC. Please help.
    Regards,
    Atiqa.

    Please read my answer for your other question.
    Vadim

  • Cross validation on cost allocation flexfield

    We have setup a cost allocation ff with the option to cross-validate segments. We have correctly defined cross validation rules. Yet, when entering costing information for an element entry, the system allows us to enter a combination which violates our cross-validation rules. We have already checked that this combination was not existing before we created the rule so we do not understand why the rule is not working. Any ideas?

    did u try with the below error message
    ID HRD for the flexfield segment Profit Centre does not exist in the value set PROFIT_CENTRE.
    checking value set which is is referring

Maybe you are looking for

  • Creation of service master for the PM in Emigall

    Hi Fritz, Greetings, I wanted to ask that can we ahead and use the Service master data loading process through Emigall. and what are the step that we can use to avail that in Emigall. Regards, Robert.

  • How to Delete duplicate contacts in the messaging app?

    I set up a new email account, and was trying to send my contacts to the new account. In doing so I did not get the contacts to sync with the new account, but they did duplicate in my contacts app and my messaging contacts app. I can not find a means

  • How to restore the link between on screen library item and audio file?

    Do you have a BORKEN LINKS problem? I'd like to share a useful discovery. I have read a number of posts both here and other forums concerning 'broken links' problem after moving iTunes music folder to an external drive. ie. In the iTunes window you s

  • DeskTop Manager and OS X Lion

    With Lion due to be released in July. Does anyone know whether DTM will be compatible with it? Regards Mark Solved! Go to Solution.

  • Added WBS to FAGLFLEXT, and WBS no longer shown on FAGLL03

    Hi Guru's We recently added the WBS element to the FAGLFEXT table (mid April). When we run FAGLL03 this no longer shows the WBS element for historical documents - it shows it from Mid April only. Previous extracts from FAGLL03 have show the WBS. Is t