Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Function module to create attendance (IT2002)

Former Member
0 Kudos
787

Hi,

Is there any function module to create IT2002 - Attendance. I am experiencing error in HR_INFOTYPE_OPERATION while trying to create IT2002. BDC will be considered as last option. Please suggest some other method if any. thanks

6 REPLIES 6

former_member188685
Active Contributor
0 Kudos
249

What error you are getting..?? Give more information..

Former Member
0 Kudos
249

Hi,

Check using this one "BAPI_PTMGRATTABS_MNGCREATION". This FM is support for create Attendance and Absence details.

Note : Attendance details are stored in PA2002 table and Absence are stored in PA2001.

I hope it's support.

Regards

Vijay

0 Kudos
249

Hi,

Thanks for the refering FM BAPI_PTMGRATTABS_MNGCREATION. But i am getting the same error when i used FM HR_INFOTYPE_OPERATION. Error "UNCAUGHT_EXCEPTION - CX_HRPA_INVALID_PARAMETER". Any idea on this. Parameters passed to FM : PERNR , Att type and Start and end date.

Thanks.

0 Kudos
249

Hi,

USe., BAPI_ABSENCE_CREATE

Before you call the BAPI to update the data use BAPI BAPI_EMPLOYEE_ENQUEUE to lock the employee so that mean time no one else update the data.

Then call the BAPI BAPI_ABSENCE_CREATE

Then unlock the employee with BAPI BAPI_EMPLOYEE_DEQUEUE, Unlock employee

Pass the Required Parameters: Employeenumber Validitybegin Validityend Absencetype

hope this helps u.,

Thanks & Regards,

Kiran

0 Kudos
249

Hello

I am having the same Problem.

I created a Fuba in which i read som Trip Data with BAPI_TRIP_CHECK_STATUS before i am using the FUBA BAPI_PTMGRATTABS_MNGCREATION. This way i am getting the exactly same dump.

If i read the trip data not with the sap_bapi but with a simple select, then all works fine.

At least it works if i test the Fuba.

But wenn i use my Fuba in a workflow, the stepp stays in state 'running', but nothing is happening.

Greatings

Stefan

0 Kudos
249

Hi

Thanks for the quick response!

I can't use the BAPI BAPI_ABSENCE_CREATE pecause this will write on it2001 i have to write at I2002.

I did lock the employee, and i did unlock it afterwards, and i did call a commit then.

I also passed exactly those parameters you mentioned, plus the times for end and beginning.

As i said it is working fine if i test the Fuba, or even the BOR-Objekt-Mehtode which uses this Fuba, but when it is called from Workflow nothing happens and the WF gets stucked.

In the docu of the Fuba BAPI_ABSENCE_CREATE there is said we should use the Methode of BUS7007.

In this Methode once again the FUba BAPI_PTMGRATTABS_MNGCREATION is used.