‎2006 Jun 28 8:58 AM
Hi,
Is there any function module for uploading data to infotype 2001 and 2002? (Time data recoring)
Thanks.
‎2006 Jun 28 11:03 AM
Hi,
check this out: BAPI_PTMGRATTABS_MNGCREATION (ecc5.0)
Regards,
Mikko
‎2006 Jun 28 11:03 AM
Hi,
check this out: BAPI_PTMGRATTABS_MNGCREATION (ecc5.0)
Regards,
Mikko
‎2006 Jun 28 11:12 AM
Thanks.
Do you have any idea how to use the function module
HR_ABS_ATT_TIMES?
‎2006 Jun 28 11:20 AM
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
‎2006 Jun 28 11:55 AM
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?
‎2006 Jun 28 11:58 AM
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.
‎2006 Jun 28 12:08 PM
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
‎2006 Jun 28 12:21 PM
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
‎2006 Jun 28 12:23 PM
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
‎2006 Jun 28 12:32 PM
What is BAPI usage approach? Is there any sequence?
Thanks.
Regards,
Madhu
‎2006 Jun 28 12:40 PM
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
‎2006 Jun 28 11:14 AM
Hi mudhukeshwar,
1. use the fm HR_INFOTYPE_OPERATION
regards,
amit m.