2009 Sep 16 10: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
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
2009 Sep 16 10:56 AM
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
2009 Sep 16 10:58 AM
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
2009 Sep 17 6:58 AM
Thank to you all for the Information
Edited by: Arunna.S on Sep 17, 2009 7:59 AM
2009 Sep 16 11:06 AM
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
2009 Sep 16 11:08 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |