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

What will the function module HR_INFOTYPE_OPERATION do?

Former Member
0 Likes
994

What will the function module HR_INFOTYPE_OPERATION do?

I need to insert/update /delete a record from HR related standard tables...

will this function module do this?

If not then what function module will do this job?

Edited by: Arunna.S on Sep 16, 2009 11:54 AM

What will the function module HR_INFOTYPE_OPERATION do?

I need to insert/update /delete a record from HR related standard tables...

will this function module do this?

If not then what function module will do this job?

Edited by: Arunna.S on Sep 16, 2009 11:54 AM

5 REPLIES 5
Read only

Former Member
0 Likes
828

Hi,

This function module enables you to maintain master data for employees and applicants. You can transfer one data record. All validation checks take place that would take place in the individual maintenance screens in the dialog. If necessary, the module returns an error message. The error messages are the same as the error messages in the dialog, that is, the individual maintenance screen error messages are transferred rather than interpreted by this module.

Based on the Import parameter OPERATION you can perform the kind of operation you would like to wish on PA infotypes

Regards

Pavan

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
828

Hi

HR_INFOTYPE_OPERATION

Will Update the Infotype.

That is additing data to the Infotype and deleting data to the Infotype like that.

Regards,

Sreeram

Read only

0 Likes
828

Thank to you all for the Information

Edited by: Arunna.S on Sep 17, 2009 7:59 AM

Read only

arvind_soni
Participant
0 Likes
828

Hello,

The HR_INFOTYPE_OPERATION function module is used for the Maintenance of HR infotypes, such as inserting, changing, deleting data etc

Example coding for MOD operation

CONSTANTS: change TYPE pspar-actio VALUE 'MOD'.

"This code is requred and locks the record ready for modification

CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'

EXPORTING

number = p_pernr.

"loop at p0071 into p_p0071. "added to put code in context

validitybegin = p_record-begda.

validityend = p_record-endda.

p_record-endda = pn-begda - 1.

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

EXPORTING

infty = '0071'

subtype = p_record-subty

objectid = P_record-objps

number = p_record-pernr "employeenumber

validityend = validityend

validitybegin = validitybegin

record = p_record

recordnumber = p_record-SEQNR

operation = change

nocommit = nocommit

dialog_mode = '0'

IMPORTING

return = return_struct

key = personaldatakey

EXCEPTIONS

OTHERS = 0.

"endloop.

"unlock record after modification

CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'

EXPORTING

number = p_pernr.

Example coding for INS operation

CONSTANTS: insert TYPE pspar-actio VALUE 'INS'.

"This code is requred and locks the record ready for modification

CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'

EXPORTING

number = p_pernr.

validitybegin = p_record-begda.

validityend = p_record-endda.

p_record-pernr = p_pernr

p_record-begda = pn-begda.

p_record-endda = validityend.

p_record-subty = p_SUBTY. "subtype of new entry

p_record-SCREF = p_SUBTY. "subtype of new entry

"plus populate any other fields you need to update

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

EXPORTING

infty = '0071'

subtype = p_record-subty

number = p_record-pernr "employeenumber

validityend = validityend

validitybegin = validitybegin

record = p_record

operation = insert

nocommit = nocommit

dialog_mode = '0'

IMPORTING

return = return_struct

key = personaldatakey

EXCEPTIONS

OTHERS = 0.

"unlock record after modification

CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'

EXPORTING

number = p_pernr.

Edited by: Arvind Soni on Sep 16, 2009 3:37 PM

Read only

Former Member
0 Likes
828

[;

[;