Application Development and Automation 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: 
Read only

HR_ECM_INSERT_INFOTYPE produces runtime error

Former Member
0 Likes
1,152

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
Read only

Former Member
0 Likes
987

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.

Read only

0 Likes
987

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

Read only

0 Likes
987

how you define w_rec_it0008 ?

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

Read only

0 Likes
987

it is type p0008

Read only

0 Likes
987

Post the code using the function HR_INFOTYPE_OPERATION .

are you authorized to create any HR infotype records

Read only

amit_khare
Active Contributor
0 Likes
987

Instead of this FM 'HR_ECM_READ_INFOTYPE' use HR_READ_INFOTYPE.

Read only

Former Member
0 Likes
987

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

Read only

0 Likes
987

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