10-31-2007 10:44 AM
Hi,
I am using the FM HR_INFOTYPE_OPERATION to modify a record in PA0023 infotype.
My problem is that I am getting an error that 'Infotype does not exist'.
I filled the pernr,begda and endda fields alongwith the other fields in a work area of type
p00023.I then passed this work area in the record parameter of the FM.I aslo passed the same
begda and endda to the validitybegin and validityend date.I even used enqueue and dequeue but
still the error comes.
Please help me asap.
Thanks in advance.
Sandeep.
10-31-2007 10:47 AM
I think you miss this Parameter-
INFTY = '0015'
Check the link for the usage.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0015'
NUMBER = P0015-PERNR
SUBTYPE = P0015-SUBTY
OBJECTID = P0015-OBJPS
LOCKINDICATOR = P0015-SPRPS
VALIDITYEND = P0015-ENDDA
VALIDITYBEGIN = P0015-BEGDA
RECORDNUMBER = P0015-SEQNR
RECORD = P0015
OPERATION = 'INS'
TCLAS = 'A'
DIALOG_MODE = '0'
IMPORTING
RETURN = RETURN
KEY = KEY.
Regards,
Amit
Reward all helpful replies.
10-31-2007 10:47 AM
I think you miss this Parameter-
INFTY = '0015'
Check the link for the usage.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0015'
NUMBER = P0015-PERNR
SUBTYPE = P0015-SUBTY
OBJECTID = P0015-OBJPS
LOCKINDICATOR = P0015-SPRPS
VALIDITYEND = P0015-ENDDA
VALIDITYBEGIN = P0015-BEGDA
RECORDNUMBER = P0015-SEQNR
RECORD = P0015
OPERATION = 'INS'
TCLAS = 'A'
DIALOG_MODE = '0'
IMPORTING
RETURN = RETURN
KEY = KEY.
Regards,
Amit
Reward all helpful replies.
10-31-2007 10:53 AM
Check this.. It is for infotype 3.
REPORT zpdem008.
TABLES: pernr.
INFOTYPES: 0003.
DATA: return_struc TYPE bapireturn1,
record_key TYPE bapipakey.
parameters: tage type i default 365.
GET pernr.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = p0003-pernr
IMPORTING
return = return_struc.
IF NOT return_struc IS INITIAL.
WRITE: / pernr-pernr, (70) return_struc-message.
REJECT.
ENDIF.
LOOP AT p0003 WHERE endda GE pn-begda
AND begda LE pn-endda.
IF NOT p0003-abrdt IS INITIAL.
CLEAR p0003-abrdt.
ENDIF.
p0003-bderr = p0003-bderr + tage.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0003'
number = p0003-pernr
SUBTYPE =
OBJECTID =
LOCKINDICATOR =
validityend = p0003-endda
validitybegin = p0003-begda
recordnumber = p0003-seqnr
record = p0003
operation = 'MOD'
TCLAS = 'A'
dialog_mode = '1'
NOCOMMIT =
VIEW_IDENTIFIER =
SECONDARY_RECORD =
IMPORTING
return = return_struc
key = record_key.
IF NOT return_struc IS INITIAL.
WRITE: / return_struc.
ELSE.
WRITE: / 'Record '(002), record_key, 'modified'(003).
ENDIF.
ENDLOOP.