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

Not modfying ithe infotype while using FM HR_INFOTYPE_OPERATION

Former Member
0 Likes
517

Hi Experts,

When i am using this FM HR_INFOTYPE_OPERATION its not modifying the infotype 14.Can you please suggest me. Please see my below code. Can please let me know if i am wrong..

form INSERT_DATA_0014 .

loop at pa_0014.

CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'

EXPORTING

number = pa_0014-pernr

IMPORTING

RETURN = it_return.

.

IF it_return-id EQ 'E'.

WRITE: / v_pernr, 'Enqueue failed'.

else.

write: 'successfully locked'.

ENDIF.

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

EXPORTING

infty = '0014'

number = pa_0014-pernr

  • SUBTYPE = pa_0014-SUBTY

  • OBJECTID = pa_0014-OBJPS

  • LOCKINDICATOR = pa_0014-SPRPS

VALIDITYEND = pa_0014-begda

VALIDITYBEGIN = pa_0014-endda

  • RECORDNUMBER = pa_0014-SEQNR

record = pa_0014

operation = 'MOD'

TCLAS = 'A'

DIALOG_MODE = '0'

NOCOMMIT = ''

  • VIEW_IDENTIFIER =

  • SECONDARY_RECORD =

IMPORTING

RETURN = l_bapireturn

KEY = bapipakey_tab

.

IF l_bapireturn-id NE space.

WRITE: / v_pernr, 'error'.

ELSE.

WRITE: /'SUCCESSFULLY INSERTED'.

ENDIF.

CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'

EXPORTING

number = v_pernr

IMPORTING

RETURN = l_bapireturn

.

IF l_bapireturn-id NE space.

WRITE: / v_pernr, 'Enqueue failed'.

else.

write: /'record successfully modified'.

ENDIF.

endloop.

endform.

Thanks,

Munna.

5 REPLIES 5
Read only

former_member242255
Active Contributor
0 Likes
497

try by adding the BAPI TRANSACTION COMMIT function module after the operation FM..

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
497

Hi,

Check the importing return parameter after the function module in debugging.

Try using dialog mode '1', so that you can understand what exactly is happening and then change the dialog mode to '0'.

Read only

Former Member
0 Likes
497

Hi,

Check the entire return internal table I_BAPIRETURN of FM HR_INFOTYPE_OPERATION what it has got to say ( a error message will be there which will tell where is the problem ). If it is initial then check the table PA0014 if the record has been modified. If its still not modified then check if at all it can be manually by PA30. If it doesnt get modified even manually then this is some configuration related issue.

Regards.

Read only

Former Member
0 Likes
497

Hi,

Please check following in your code:

1. Start and end dates are set wrongly. They are swapped.

2. If the record is successfully locked, only then call the info type opeartion FM. So, it should be in

your else part.

3. Pass lock indicator as space

4. Pass nocommit indicator as space

Thanks,

SKJ

Read only

Former Member
0 Likes
497

check l_bapireturn contents and problem will be solved. I think you have some config Issue in T511 table.