Skip to Content
author's profile photo Former Member
Former Member

HR ABAP Overtime Calc.

Dear Gurus,

I have an Internal Table in which has Personnel No, Wage type, Overtime Hours and Date based on that I have to do some calculation based on different employee group and subgroup and update the InfoType 0015.

So , is there a Function Module or anything to achieve so?

Please help me out on this, this is my very first development in HR ABAP, so I have no clue what so ever, Please help me.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Posted on Jan 07, 2014 at 06:29 AM

    Hi Hari,

    you can use the function module HR_UPDATE_COST_ASSIGN or HR_INFOTYPE_OPERATION,

    but i will sujjest you to see this link, you will get something that will be helpful to you.

    http://scn.sap.com/thread/805712

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 07, 2014 at 06:34 AM

    You can make use of indirect valuation badi "HR_INDVAL" to define your logic. Ask your functional consultant to define an indirect valuation module and assign it to the overtime wage type in spro. Then you can write your logic in the implementation of badi "HR_INDVAL". You won't be required to carry out any calculation in your upload program or even when you create it through PA30 as overtime will be calculated using badi based on overtime hours and other parameters.

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2014 at 07:13 AM

    Hi Hari ,

    u can use the bellow function module for updating the info type UPDATION

    CALL FUNCTION 'HR_INFO TYPE_OPERATION'
    EXPORTING
    infty = '0015'
    number = PERNR
    * SUBTYPE =
    * OBJECTID =
    * LOCKINDICATOR =
    * VALIDITYEND =
    * VALIDITYBEGIN =
    * RECORDNUMBER =
    record = P0015
    operation = 'INS'
    * TCLAS = 'A'
    * DIALOG_MODE = '0'
    * NOCOMMIT =
    * VIEW_IDENTIFIER =
    * SECONDARY_RECORD =
    * IMPORTING
    * RETURN =
    * KEY =



    u should pass the importing parameters

    1.pernr

    2.infotype number

    3.infotype data strecture along with data


    before u going to call this fm


    it is better to use locking and unlocking mechanism


    bapi_employee_enquu


    bapi_employe_dequee.


    Regards ,

    Pramodh.M






    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 07, 2014 at 07:31 AM

    Hi Hari,

    If you want to upload infotype record go a head with HR_INFOTYPE_OPERATION (Note: It is not released yet for customers). If you want to write some logic or validation while updating use Badi HRPAD00INFTY. Revert back in case of issues.

    Hope it might help you.

    With Regards,

    Giriesh M

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 07, 2014 at 08:55 AM

    hi,


    Please look this code....


    loop at it_0015 into wa_0015.


    CALL FUNCTION 'HR_PSBUFFER_INITIALIZE'.


    CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
    EXPORTING
    number = wa_0015-pernr.

    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    EXPORTING
    infty = '0015'
    number = wa_0015-pernr "employeenumber
    record = wa_0015
    operation = 'MOD'
    validityend = wa_0015--endda
    validitybegin = wa_0015--begda
    tclas = 'A'
    IMPORTING
    return = return_struct
    key = personaldatakey
    EXCEPTIONS
    OTHERS = 0.



    CALL FUNCTION 'ABAP4_COMMIT_WORK'.


    CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
    EXPORTING
    number = wa_0015--pernr.


    endloop.




    where wa_0015 is ur work area...


    INS - Insert operation - creates new record,

    MOD - Modify operation

    COP - Copy

    DEL - Delete record


    Hope this code helps for update the IT0015.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.