Skip to Content
0

update secondary_record using HR_INFOTYPE_OPERATION

Mar 18, 2017 at 10:38 AM

324

avatar image
Former Member

We're trying to update addres data information using FM hr_infotype_operation but it doesn't seem to be working properly for IT0838. It update onlye the infotype IT0006.

We have the requirement to modify an existing dep record, delimit the record.

tables:
pernr.
infotypes:0006,0838.

data:  rec_p0006 type p0006,
       rec_p0838 type p0838.

data w_return type  bapireturn1.
start-of-selection.
get pernr.
  read table p0838 index 1.
  rec_p0838 = p0838.

   read table p0006 index 1.
  rec_p0006 = p0006.

* Enqueue personnel number
  call function 'BAPI_EMPLOYEE_ENQUEUE'
    exporting
      number = pernr-pernr
    importing
      return = w_return.

  call function 'HR_INFOTYPE_OPERATION'
    exporting
      infty            = '0006'
      number           = pernr-pernr
      subtype          = '9001'
      record           = rec_p0006
      validityend      =  '99991231'
      validitybegin    = SY-DATUM
      operation        = 'MOD'
      dialog_mode      = '1'
      view_identifier  = '38'
      secondary_record = rec_p0838
    importing
      return           = w_return.

CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
  EXPORTING
    number        = pernr-pernr
 IMPORTING
   RETURN        = w_return.


COMMIT WORK AND WAIT.
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

avatar image
Former Member Jun 07, 2017 at 02:56 PM
0

Hi Wilman Santiago

did you solved the issue? We have exactly the same problem with secondary record for Addresses in Colombia.

Thank you and best regards

João Macedo

Share
10 |10000 characters needed characters left characters exceeded
Christopher Solomon
Jun 07, 2017 at 04:04 PM
0

You didn't really mention anything more that you have done. Did you check config? Did you debug and see "why" it is not updating the second record? Just showing code and saying "it doesn't work.....fix it" is not really helping us help you.

Share
10 |10000 characters needed characters left characters exceeded