Skip to Content
0
Former Member
Apr 17, 2008 at 01:39 PM

Hr_infotype_operation

135 Views

Hi

I have created a custom infotype(9001) and i am updating entries in hrp1001 through that custom infotype. i have kept an alv grid in 9001, so that user can enter multiple entries. The client requirement is that the control shoud stay in 9001 itself once the user enters an entry and presses save, so that he can enter more entries one after the other and see whether each one got saved or not. To acheive this we have commented the standard MODULE post_input_checks, since when i press save the control goes out of infotype which is the standard functionality. But to update PA9001 table i am using hr_infotype_operation function module, since we have commented MODULE post_input_checks which usually updates the PA table.

Now i have a problem with hr_infotype_operation, The new entries are not getting saved.

I tried this in PAI of 9001

*call function 'HR_EMPLOYEE_ENQUEUE'

  • exporting

  • number = pspar-pernr

  • importing

  • return = return_struc

  • locking_user = sy-uname.

*

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

EXPORTING

INFTY = '9004'

NUMBER = pspar-pernr

  • SUBTYPE =

  • OBJECTID =

  • LOCKINDICATOR = l_lock

VALIDITYEND = p9004-endda

VALIDITYBEGIN = p9004-begda

  • RECORDNUMBER = '000'

RECORD = P9004

OPERATION = 'INS'

  • TCLAS = 'A'

  • DIALOG_MODE = l_dailog

  • NOCOMMIT =

  • VIEW_IDENTIFIER =

  • SECONDARY_RECORD =

IMPORTING

RETURN = wlt_return

KEY = wlv_key

.

*call function 'HR_EMPLOYEE_DEQUEUE'

  • exporting

  • number = pspar-pernr

  • importing

  • return = return_struc.

but it's not working. The reason may be i have entered with same pernr in create mode and now i am tring to create an entry for the same pernr in PA9001 table.

The error in wlv_return table is 'No data exists for te pernr'.

i tried directly updating the table PA9001 using insert statement. But it's not advisable.

could any one suggest me the solution. It's urgent.

Thanks and regards

Ravi