Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Updating infotype

I'm trying to update the record of an infotype. When doing it like:

  
p9007-sprps = ' '.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
  EXPORTING
    infty                  = '9007'
    number                 = p9007-pernr
    subtype                = p9007-subty
    objectid               = p9007-objps
    lockindicator          = 'X'
    validityend            = p9007-endda
    validitybegin          = p9007-begda
    recordnumber           = p9007-seqnr
    record                 = p9007
    operation              = 'MOD'
    nocommit               = 'X'
  IMPORTING
    return                 = return1.

an error is returned: "EPG 008 Infotype does not exist"

When doing it as follows, I get the expected result.

  
CLEAR return1.
  CALL FUNCTION 'HR_INFOTYPE_OPERATION'
  EXPORTING
    infty                  = '9007'
    number                 = p9007-pernr
    subtype                = p9007-subty
    objectid               = p9007-objps
    lockindicator          = p9007-sprps
    validityend            = p9007-endda
    validitybegin          = p9007-begda
    recordnumber           = p9007-seqnr
    record                 = p9007
    operation              = 'DEL'
    nocommit               = 'X'
  IMPORTING
    return                 = return1.

  p9007-sprps = ' '.

  CALL FUNCTION 'HR_INFOTYPE_OPERATION'
  EXPORTING
    infty                  = '9007'
    number                 = p9007-pernr
    subtype                = p9007-subty
    objectid               = p9007-objps
*    lockindicator          =
    validityend            = p9007-endda
    validitybegin          = p9007-begda
    recordnumber           = p9007-seqnr
    record                 = p9007
    operation              = 'INS'
    nocommit               = 'X'
  IMPORTING
    return                 = return1.

replied

Obviously something wrong the values passed in the 1st instance.. I would use the function call HR_READ_INFOTYPE to retrieve the record , change the fields as needed and pass that record to HR_INFOTYPE_OPERATION..

~Suresh

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question