Skip to Content
0
Former Member
Jun 28, 2007 at 12:45 PM

Issue updating Infotype 00015 and 0000

23 Views

Hello Experts:

I'm using a function module to update two infotypes in the same process, this is my piece of code:

* Enqueue personnel number
  call function 'BAPI_EMPLOYEE_ENQUEUE'
    EXPORTING
      number = pernr
    IMPORTING
      return = return.
  if not return is initial.
    message id return-id type return-type number return-number
             with return-message_v1 return-message_v2
                  return-message_v3 return-message_v4.
    raise action_stopped.
  endif.
*

* Perform PA30 via infotype_operation to 0000
  call function 'HR_INFOTYPE_OPERATION'
    EXPORTING
      infty         = '0000'
*      subtype       = subty
      number        = pernr
      validitybegin = datum
      record        = p0000
      operation     = 'INS'
      dialog_mode   = '1'
    IMPORTING
      return        = return.
  break-point.
  if not return is initial.
    message id return-id type return-type number return-number
             with return-message_v1 return-message_v2
                  return-message_v3 return-message_v4.
    raise action_stopped.
  endif.



* Perform PA30 via infotype_operation to 00015
  call function 'HR_INFOTYPE_OPERATION'
    EXPORTING
      infty         = '0015'
      subtype       = subty
      number        = pernr
      validitybegin = datum
      record        = p0015
      operation     = 'INS'
      dialog_mode   = '1'
    IMPORTING
      return        = return.
  break-point.
  if not return is initial.
    message id return-id type return-type number return-number
             with return-message_v1 return-message_v2
                  return-message_v3 return-message_v4.
    raise action_stopped.
  endif.
*



* Dequeue personnel number
  clear return.
  CALL FUNCTION 'BAPI_EMPLOYEET_DEQUEUE'
    EXPORTING
      NUMBER = pernr
    IMPORTING
      RETURN = return.
  if not return is initial.
    message id return-id type return-type number return-number
             with return-message_v1 return-message_v2
                  return-message_v3 return-message_v4.
    raise action_stopped.
  endif.

When the program finish I'm receiving an error message that says:

"SQL ERROR IN THE DATABASE WHEN ACCESSING A TABLE"

but the infotypes were updated correctly.. both of them.

Does anyone knows what could be wrong in my program? Does anyone had a similar issue in the past?

Thanks again for your help.