on 09-26-2006 12:13 PM
Hi,
I need to update infotype 2001 and 0015 for a list of employee via loop at pernr, HR_INFOTYPE_OPERATION. My requirement is to create both records together for any personnel. In another word, if employee A has error in infotype 2001, his record should not be created, whereas in the same list, infotype 2001 and 0015 records will be created for employee B.
I tried using parameter no_commit, but once i commit work, all the previous data are commited. Is there anyway I can refresh the buffer or something?
Correct me if I'm wrong, it's been a while, but isn't that what function 'HR_PSBUFFER_INITIALIZE' is for?
Documentation for the FM is in DE so Google translate it you need details, but I'm pretty sure that's what it's for.
You would make a call like this...
* Clear the buffer
CALL FUNCTION 'HR_PSBUFFER_INITIALIZE'.
* Carry out the action
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0169'
number = p0169-pernr
subtype = p0169-subty
objectid = p0169-objps
lockindicator = p0169-sprps
validityend = p0169-endda
validitybegin = p0169-begda
recordnumber = p0169-seqnr
record = p0169
operation = 'INS'
tclas = 'A'
IMPORTING
return = return.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use FM HR_INFOTYPE_OPERATION separately for IT2001 & IT0015. I mean for all employees one by one first use FM to update IT2001 if no error , then use FM for IT 0015.
Hope this helps.
Thanks,
Sarika.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Instead of HR_INFOTYPE_OPERATION, try using the function module HR_MAINTAIN_MASTERDATA. This way you can include both the infotypes ( 0015 & 2001 ) in one function call.
~Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
106 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.