Application Development and Automation 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: 
Read only

Time data recording

Former Member
0 Likes
1,183

Hi,

Is there any function module for uploading data to infotype 2001 and 2002? (Time data recoring)

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,130

Hi,

check this out: BAPI_PTMGRATTABS_MNGCREATION (ecc5.0)

Regards,

Mikko

11 REPLIES 11
Read only

Former Member
0 Likes
1,131

Hi,

check this out: BAPI_PTMGRATTABS_MNGCREATION (ecc5.0)

Regards,

Mikko

Read only

0 Likes
1,130

Thanks.

Do you have any idea how to use the function module

HR_ABS_ATT_TIMES?

Read only

0 Likes
1,130

Sorry, no. But in any case I recommend using the BAPI since SAP guarantees it won't change in the future, it probably has more documentation and overall functionality covered.

Using internal SAP functions could also be quite dangerous if you're not 100% sure of how they work (I just heard a case example where an interface consultant messed up lots of master data after having thought a function would be ok to use..)

Regards,

Mikko

Read only

0 Likes
1,130

Thanks.

I tried using BAPI_PTMGRATTABS_MNGCREATION. It gives bapi return message "Employee/applicant is not locked yet".

What can be the reason? Is it because the usage is not correct or is it because of something else?

Read only

0 Likes
1,130

Hi again,

1. we have to enqueue the employee

2. like this.

3.

DATA : locking_user LIKE sy-uname.

*----


For Enque

CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'

EXPORTING

number = ptab-pernr

IMPORTING

return = ret

locking_user = locking_user.

.

regards,

amit m.

Read only

0 Likes
1,130

Yes, this is correct. Or even better and to follow the bapi usage approach, use bapi_employee_enqueue and you're safe for future upgrades and changes.

-Mikko

Read only

0 Likes
1,130

Thanks Amit and Mikko.

I used the enque deque.

Now I am getting error message "Insert cannot be made due to collision". Is there a solution for that?

Regards,

Madhu

Read only

0 Likes
1,130

Hi Madhu,

seems like there is already an absence/attendance created for the time specified or there is another functional problem with the quotas. Talk to your HR/CATS consultant for assistance with them.

Regards,

Mikko

ps. please consider points for helpful answers

Read only

0 Likes
1,130

What is BAPI usage approach? Is there any sequence?

Thanks.

Regards,

Madhu

Read only

0 Likes
1,130

Hi,

with that I meant it's good practice to use BAPI's instead of direct table lookups and SAP internal function modules.

This is because things <u>do</u> change in SAP upgrades, SP level raises and when applying patches. BAPI's however remain unaffected so it's safe to use them in your own custom code.

-Mikko

Read only

Former Member
0 Likes
1,130

Hi mudhukeshwar,

1. use the fm HR_INFOTYPE_OPERATION

regards,

amit m.