Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

HR_ECM_INSERT_INFOTYPE produces runtime error

Former Member
0 Kudos

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

8 REPLIES 8

former_member188685
Active Contributor
0 Kudos

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.

0 Kudos

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

0 Kudos

how you define w_rec_it0008 ?

and are you able to do the same operation using PA30 transaction. check it once.

0 Kudos

it is type p0008

0 Kudos

Post the code using the function HR_INFOTYPE_OPERATION .

are you authorized to create any HR infotype records

amit_khare
Active Contributor
0 Kudos

Instead of this FM 'HR_ECM_READ_INFOTYPE' use HR_READ_INFOTYPE.

former_member181995
Active Contributor
0 Kudos

May be you are passing duplicate pernr or blank entry of pernr to 'HR_ECM_READ_INFOTYPE' ?

0 Kudos

I have reviewed all of the data going into the FM and it appears to be correct.