Pay Cost Allocation API

I have successfully created and run PAY_COST_ALLOCATION_API.CREATE_COST_ALLOCATION in a test environment. The only issue I am having is that instead of end dating the cost allocation on a particular assignment and creating a new allocation on the same assignment, it creates a new assignment for the employee with new costing information.
Is there a way to simply end date the existing costing allocation for an assignment and insert a new costing allocation for the same assignment? It would seem as simple as updating the effective_end_date for the assignment in Pay_Cost_allocations_f and then inserting a new record in the same table with an appropriate effective_start_date, and although I don't see the update hitting any other tables, I hesitate to change the table directly in that way in the event I am missing something (always a possibility).
I thought it could be done with the Pay_Cost_allocation_api, but I cannot seem to see how.
Any help is appreciated.

Hi,
Have you tried using PAY_COST_ALLOCATION_API.UPDATE_COST_ALLOCATION API to update the cost allocation.
You can, like in most of the HR Public APIs, use the two modes: p_datetrack_update_mode = 'CORRECTION' or 'UPDATE' depending on your update mode (if you want to correct/override an entry or update and keep history of the records).
When writing such a script, you would have 2 main scenarios possible (as I can guess from your requirement): you either call PAY_COST_ALLOCATION_API.CREATE_COST_ALLOCATION or the UPDATE_COST_ALLOCATION procedure depending if costing information exists or nor for the given assignment. You can write a simple procedure which will do this check (based on table "pay_cost_allocations_f" for a given assignment_id) and depending on what's returned, you can call the proper PAY_COST_ALLOCATION_API procedures (CREATE or UPDATE).
Hope this helps...

Similar Messages

  • Organization & Cost Allocation : API question

    Hello
    I need to setup the master data of cost allocation segments (Segment1 to 6) in our case, I am unable to find a suitable API for the purpose. I was expecting that hr_organization_api.create_hr_organization or hr_organization_api.create_organization should be accepting these segments to create an org and a cost_allocation_keyflex_id but that is not the case.
    I searched and came across hr_cost_allocation_api.create_cost_allocation where it does take in segments but also has assignment_id as a mandatory field which doesnt make sense as I am only interested in first setting up cost allocation segments and logically this should happen first and later we shud be able to assign it to the employee's assignment.
    Can anyone guide me to an API that setup the cost allocation?
    Thanks & Regards
    - Saira

    Ivan,
    All segments are optional
    Following is the error that I get:
    ORA-20001: HR_FLEX_VALUE_MISSING: N, COLUMN, SEGMENT1, N, PROMPT, COMPANY
    ORA-06512: at "APPS.HR_KFLEX_UTILITY", line 1359
    ORA-06512: at line 8
    Certainly it tries to look for segment1 value (which I dont want to supply) thus it gives error as I have not assigned the value to segment1 and as part of business need , cost centre's cost allocation must be only to segment2,4,5,6.
    I have also tried giving segment1 & 3 as NULL but get the same error
    Thanks
    - Saira

  • 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.

  • Cost event and Cost change API

    Hello,
    based on the documentation of RMS 13.2 and tests performed, the cost change information applied throught RMSSUB_XCOSTCHG.CONSUME doesn't create Cost events in RMS, thus, the future cost engine have no invoirmation about the changed cost. Logical, that the ELC is not in concideration too.
    I have a question:
    Is there a common way (best way, already implemented way) to "push" the cost change API to trigger the Cost events creation or somehow force future cost engine to recalculate the base and related cost infomation?
    Suggestions are appreciated.
    Best regards,
    Eldar.A
    Edited by: Eldar.A on 24.07.2012 3:19

    Hi,
    Please maintain correct Profit center through OKB9.
    Or if the profit center is wrongly maintain by user then add the validation with the help of abapor using badi's MB_DOCUMENT_BADI / MB_DOCUMENT_UPDATE
    Regards,
    Sandesh Sawant

  • 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

  • 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.

  • 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