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_infotype_operation

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

Hi,

Execute function module HR_INITIALIZE_BUFFER just after you executed your code

And it will work

Regards

0 Kudos

Hi

small correction.

No error message is being displayed.

when i tried to save, then F.M 'HR_INFOTYPE_OPERATION' is not getting executed, the system is hanging.

regards

badri

0 Kudos

Hi

Still it's not working, system gets hanged.

Thanks and regards

Ravi

Former Member
0 Kudos

check if UR updating PA9001 or PA9004 ... in Bold

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

0 Kudos

Hi

I have passed both P9004 structure to 'record' field and pernr also but still it's not working.

Thanks and regards

Badri

0 Kudos

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.

Since hr_infotpe_operation was not working, i have used insert statement to update PA9001 table with start date as 01.01.1800 and endate 31.12.9999. Now after creating one (entry in hrp1001 was created) entry and saving, i tried to view the entries of 9001 IT in displaymode. But first time i was not able to view the entries. But when i press enter on the pa30 screen and then click on display then i am able to view entries of 9001 IT in display mode.

I am not able to understand the wierd behavior.

Thanks and regards

Badri