Skip to Content
0
Jul 01, 2014 at 04:08 AM

Issue while creating IT0081 using HR_INFOTYPE_OPERATION

51 Views

Hello Experts,

While I try to create a record in IT0081 using FM HR_INFOTYPE_OPERATION, all data flows correctly to IT0081 screen except Unit (P0081-WDEIN) and rank (P0081-WDGRD).

Here is the sample code I created:

report zmtest.

data: ls_p0081 type p0081,

ls_return type bapireturn1.

ls_p0081-pernr = '12345'. " Hardcode PERNR vale here

ls_p0081-subty = '01'.

ls_p0081-objps = '01'.

ls_p0081-begda = '20140701'.

ls_p0081-endda = '99991231'.

ls_p0081-wdgrd = '003'.

ls_p0081-wdart = '01'.

ls_p0081-wderd = '20140515'.

ls_p0081-wdein = 'Test'.

ls_p0081-wdpfl = 'X'.

clear: ls_return.

call function 'BAPI_EMPLOYEET_ENQUEUE'

exporting

number = '12345'

validitybegin = '20140701'

importing

return = ls_return.

call function 'HR_INFOTYPE_OPERATION'

exporting

infty = '0081'

number = '12345'

subtype = '01'

* OBJECTID =

* LOCKINDICATOR =

validityend = '99991231'

validitybegin = '20140701'

* RECORDNUMBER =

record = ls_p0081

operation = 'INS'

tclas = 'A'

dialog_mode = '2'

* NOCOMMIT =

* VIEW_IDENTIFIER =

* SECONDARY_RECORD =

importing

return = ls_return

* KEY =

.

write: ls_return.


Please suggest !!