Skip to Content

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

HR_INFOTYPE_OPERATION

How do you update infotype 168 using HR_INFOTYPE_OPERATION?

I am trying to update a IT168 record with Begda 01/01/2008 and ENDDA 02/06/2008.

Should I use the HR_INFOTYPE_OPERATION twice to make an update to a record?

I tried the following code, but got an error saying "EPG 009No data stored for 0168 in the selected period" in the Return value. Please let me know whether my parameters are correct?

DATA: V_PA0168 LIKE BAPIRETURN1 .

DATA : S_P0168 TYPE P0168.

S_P0168-BEGDA = '20080101'.

S_P0168-ENDDA = '20080206'.

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

EXPORTING

INFTY = '0168'

NUMBER = '9000'

SUBTYPE = 'SLIF'

OBJECTID = S_P0168-OBJPS

LOCKINDICATOR = S_P0168-SPRPS

VALIDITYEND = S_P0168-ENDDA

VALIDITYBEGIN = S_P0168-BEGDA

RECORDNUMBER = S_P0168-SEQNR

RECORD = S_P0168

OPERATION = 'MOD'

TCLAS = 'B'

  • DIALOG_MODE = '0'

  • NOCOMMIT =

  • VIEW_IDENTIFIER =

  • SECONDARY_RECORD =

IMPORTING

RETURN = V_PA0168

  • KEY =

.

Thanks.

Tags:
Former Member
Former Member replied

You normally get this error if you are not sending the right data that matches the database record to be modified.

Lookup the entry you are trying to modify and see if all the fields you are pasing to the BAPI except the RECORD matches exactly.

CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0168'
NUMBER = '9000'                               "should match database record
SUBTYPE = 'SLIF'                               "should match database record
OBJECTID = S_P0168-OBJPS              "should match database record
LOCKINDICATOR = S_P0168-SPRPS   "should match database record
VALIDITYEND = S_P0168-ENDDA        "should match database record
VALIDITYBEGIN = S_P0168-BEGDA    "should match database record
RECORDNUMBER = S_P0168-SEQNR "should match database record
RECORD = S_P0168           "this is the only place you provide the changed data
OPERATION = 'MOD' 
TCLAS = 'A'
DIALOG_MODE = '0' 
NOCOMMIT = 
IMPORTING
RETURN = V_PA0168

KEY = 

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question