10-07-2008 8:18 PM
Hi All,
Good Afternoon. I have been trying to us the FM HR_ECM_INSERT_INFOTYPE or the FM HR_INFOTYPE_OPERATION
and I am receiving runtime errors such as
CX_HRPA_VIOLATED_ASSERTION or
CX_SY_REF_IS_INITIAL
it seems that the message handler is not functioning as I have expected it to function. I have tried to enqueue the pernr prior to this code, but that doesn't help either.
CALL FUNCTION 'HR_ECM_READ_INFOTYPE'
EXPORTING
pernr = p_pernr
infty = '0002'
message_handler = message_handler
IMPORTING
infotype_tab = p0002_tab
is_ok = is_ok.
CHECK is_ok EQ true.
SORT p0002_tab DESCENDING.
READ TABLE p0002_tab INTO w_p0002 INDEX 1.
MOVE sy-datum TO w_p0002-aedtm.
CALL FUNCTION 'HR_ECM_INSERT_INFOTYPE'
EXPORTING
pnnnn = w_p0002
message_handler = message_handler
IMPORTING
is_ok = is_ok.
CHECK is_ok EQ true.
Please advise.
Kind Regards,
Daniel A. La Mendola
10-07-2008 8:29 PM
I am not very familiar with the function which you are using .
what problem you are facing with the function HR_INFOTYPE_OPERATION
I don't think you will have the problem with this function.
10-07-2008 8:47 PM
The FM HR_INFOTYPE_OPERATION bombs with either
CX_HRPA_INVALID_PARAMETER or
CX_HRPA_VIOLATED_ASSERTION or
CX_SY_REF_IS_INITIAL
I believe that I am not providing some pertinent information
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = c_infotype_0008
number = p0759-pernr
validityend = w_rec_it0008-endda
validitybegin = w_rec_it0008-begda
record = w_rec_it0008
operation = c_actio_ins
IMPORTING
return = w_return
key = w_infty_key.
and that is why it bombs.
Kind Regards,
Daniel A. La Mendola
10-07-2008 10:44 PM
how you define w_rec_it0008 ?
and are you able to do the same operation using PA30 transaction. check it once.
10-08-2008 10:43 PM
10-09-2008 3:19 AM
Post the code using the function HR_INFOTYPE_OPERATION .
are you authorized to create any HR infotype records
10-07-2008 8:37 PM
Instead of this FM 'HR_ECM_READ_INFOTYPE' use HR_READ_INFOTYPE.
10-08-2008 7:26 AM
May be you are passing duplicate pernr or blank entry of pernr to 'HR_ECM_READ_INFOTYPE' ?
10-08-2008 10:42 PM
I have reviewed all of the data going into the FM and it appears to be correct.