cancel
Showing results for 
Search instead for 
Did you mean: 

HR_INFOTYPE_OPERATION commit work

Former Member
0 Kudos

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?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

suresh_datti
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi, thanks for the reply. I like to know how we can make use of the NO_COMMIT parameter in HR_INFOTYPE_OPERATION?