06-21-2006 12:17 PM
Hi,
I'm trying to create a new entry in my infotype 9069 (testing purposes), to do this I use HR_INFOTYPE_OPERATION, but when I execute the program, I receive this error message:
E PG 428
A complex application error has occurred
But I have no idea of how to fix this, debugging the application I've found that probably the problem is with function HR_MAINTAIN_MASTERDATA, but the fields I've passed in code looks good so I think I forgot another parameter.
The following is the source code:
DATA: v_pernr TYPE rp50g-pernr,
v_begda TYPE rp50g-begda,
v_endda TYPE rp50g-endda.
DATA tabname LIKE dntab-tabname VALUE 'P9069'.
DATA w_datos TYPE p9069.
DATA w_return TYPE bapireturn1.
FIELD-SYMBOLS <datos> TYPE ANY.
START-OF-SELECTION.
v_pernr = '4'.
v_begda = '18000101'.
v_endda = '99991231'.
w_datos-pernr = v_pernr.
w_datos-infty = '9069'.
w_datos-begda = v_begda.
w_datos-endda = v_endda.
w_datos-seqnr = '000'.
this is a field of infotype,
w_datos-empresa_or = 'PPPP'.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = v_pernr
.
ASSIGN w_datos TO <datos> CASTING TYPE (tabname).
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '9069'
number = v_pernr
SUBTYPE =
OBJECTID =
LOCKINDICATOR =
validityend = w_datos-endda
validitybegin = w_datos-begda
RECORDNUMBER =
record = <DATOS>
operation = 'INS'
TCLAS = 'A'
DIALOG_MODE = '0'
NOCOMMIT =
VIEW_IDENTIFIER =
SECONDARY_RECORD =
IMPORTING
return = w_return
KEY =
.
WRITE: / w_return-type,
w_return-id,
w_return-number,
w_return-message.
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
number = v_pernr
.
06-21-2006 12:20 PM
Hi javier,
1. record = <DATOS>
If possible, try to use
a pre-defined strucure of type P9069
for putting data into this infotype.
2. Avoid using field symbols.
3. Try with P9069
regards,
amit m.
06-21-2006 12:20 PM
Hi javier,
1. record = <DATOS>
If possible, try to use
a pre-defined strucure of type P9069
for putting data into this infotype.
2. Avoid using field symbols.
3. Try with P9069
regards,
amit m.
06-21-2006 12:37 PM
I've tried this option previously and it doesn't work
Anyway I've found my error (something related with dates) so thanks
06-28-2006 6:34 PM
Hi Javier:
I am facing same kind of error.But don't think that I have date related problem Because working fine for there records.Any suggestion?
~Sinchan
06-21-2006 12:30 PM
Did you try passing the dates in mmddyyyy format?
<b>v_begda = '01011800'.
v_endda = '12319999'.</b>
Regards,
Ravi