Definition
An interface is used to terminate employees's relationship with the company.
Business Context and Use
The web service interface 'Manage Personnel Leaving In' enables you to connect external applications to your SAP Business ByDesign system and to maintain Employee Termination data, and is relevant if your company wants to manage an employee's termination data from external applications.
Prerequisites
Personnel Administration should be in scope.
Constraints and Integrity Conditions
This service can only be used for termination of employees once in any system. Hence only '01 = create' action code is supported in this service. All other action codes are hereby not supported.
More Information
General Information
You can find general information about Web services, their structure and consumption in the Web Services documentation. Please open the Web Services document in a new window.
Scenarios
Possible scenarios include the following:
The MaintainBundle operation is used to create termination data of employees.
The following is an example of a web service request for employee termination where Employee ID '3375' will be terminated on 24-Jan-2013:
<n0:PersonnelLeavingBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global">
<BasicMessageHeader>
<ID>Token4</ID>
<ReferenceID>Token10</ReferenceID>
<ReferenceUUID></ReferenceUUID>
</BasicMessageHeader>
<PersonnelLeaving actionCode="01">
<ObjectNodeSenderTechnicalID>Token14</ObjectNodeSenderTechnicalID>
<ChangeStateID></ChangeStateID>
<LeavingDate>2013-01-24</LeavingDate>
<EmployeeID>3375</EmployeeID>
<PersonnelEventTypeCode>4</PersonnelEventTypeCode>
<PersonnelEventReasonCode>4</PersonnelEventReasonCode>
<WithoutNoticeIndicator>true</WithoutNoticeIndicator>
</PersonnelLeaving>
</n0:PersonnelLeavingBundleMaintainRequest_sync>
The response of the service will have the following:
For successful execution -
1. UUID - PersonnelLeaving business object UUID is generated only if employee's termination data has been updated successfully.
2. Change State ID
3. Referenced Sender Technical ID
4. Log for any warning or information messages.
For errors, the log is updated with errors.
The sample response of the service is as follows:
<n0:PersonnelLeavingBundleMaintainConfirmation_sync xmlns:n0="http://sap.com/xi/SAPG/Global" xmlns:prx="urn:sap.com:proxy:QXX:/1SAI/TC3DE4EAFD:804">
<PersonnelLeaving>
<ReferenceObjectNodeSenderTechnicalID>Token14</ReferenceObjectNodeSenderTechnicalID>
<ChangeStateID>20150721084919.7466930</ChangeStateID>
<UUID>00163e04-ed39-1ee5-8bf0-abfb12d79cc1</UUID>
</PersonnelLeaving>
</n0:PersonnelLeavingBundleMaintainConfirmation_sync>
Definition
To maintain a bundle of terminations of employees. Currently, terminations can only be created.
Business Context and Use
The web service interface 'Manage Personnel Leaving In' enables you to connect external applications to your SAP Business ByDesign system and to terminate employees in your system, and is relevant if your company wants to access and manage employee data from external applications.
The request message of the operation MaintainBundle contains a BasicMessageHeader node element as well as Personnel Hiring node element that contains the employee data to be maintained. The detailed structure of the Personnel Hiring node will be explained in the following sub-chapters. The Personnel Hiring node can occur multiple times in the request message – this means that Personnel Hiring data for multiple employees can be maintained through a single web service request.
The response message type of the operation MaintainBundle contains log items, processing information and an account-specific node with ReferenceObjectNodeSenderTechnicalID, ChangeStateID, as well as employee UUID.
Prerequisites
Personnel Administration should be in scope.
Structure
The structure of operation Maintain Bundle contains general information of the employee who needs to be terminated.
The UUID element is not visible on the user interface but may be known out of the response of a read service.
Personnel Leaving
The Personnel Leaving node contains information like Employee ID, Leaving date and Personnel Event Type code and Reason code which is only required for an employee to be terminated. Reason code values are determined based on Personnel Event type code selection.
The following are examples of code values for element Personnel Event Type code and Reason code:
| PersonnelEvent TypeCode |
Description |
| 3 |
Dismissal |
| 4 |
Resignation |
Reason code in case Personnel Event Type code is Dismissal -
| Reason code |
Description |
| 1 |
Missing qualifications |
| 2 |
Reorganization |
| 3 |
End of limitation |
| 4 |
Gross misconduct |
| 5 |
Lacking ability |
| 6 |
Redundancy |
| 7 |
Statutory reason |
Reason code in case Personnel Event Type code is Resignation -
| Reason code |
Description |
| 1 |
Better career opportunities |
| 2 |
Death of employee |
| 3 |
Disturbed working relationship |
| 4 |
Health reasons |
| 5 |
Management style |
| 6 |
Personal or family circumstances |
| 7 |
Decision to study |
| 8 |
Salary |
| 9 |
Workload |
| 10 |
Other |
Example
The following is an example where Employee ID '3375' will be terminated on 24-Jan-2013:
<n0:PersonnelLeavingBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global">
<BasicMessageHeader>
<ID>ABCD01</ID>
<ReferenceID>REF001</ReferenceID>
<ReferenceUUID></ReferenceUUID>
</BasicMessageHeader>
<PersonnelLeaving actionCode="01">
<ObjectNodeSenderTechnicalID>Token14</ObjectNodeSenderTechnicalID>
<ChangeStateID>XYZ01</ChangeStateID>
<!-- Last date of work !-->
<LeavingDate>2013-01-24</LeavingDate>
<!-- Employee ID!-->
<EmployeeID>3375</EmployeeID>
<PersonnelEventTypeCode>4</PersonnelEventTypeCode>
<PersonnelEventReasonCode>4</PersonnelEventReasonCode>
<WithoutNoticeIndicator>true</WithoutNoticeIndicator>
</PersonnelLeaving>
</n0:PersonnelLeavingBundleMaintainRequest_sync>
Constraint
The Manage Personnel Leaving – Maintain Bundle can only be used for internal employees.
Once an employee is terminated through Manage Personnel Leaving - Maintain Bundle, the leaving date can be modified. The only constraint is that leaving date can only be advanced and not postponed.