Description | Query Employees |
Name | QueryEmployeeIn |
Namespace | http://sap.com/xi/A1S/Global |
Process Component Description | Business Partner Data Management |
Process Component Name | BusinessPartnerDataManagement |
Process Component Namespace | http://sap.com/xi/AP/FO/BusinessPartner/Global |
Deployment Unit Description | Foundation |
Endpoint Activation | By Scoping of Process Component | Operations |
Release Status | Released |
An interface to query employee and work agreement data.
The web service interface Query Employee In enables you to connect external applications to your solution and to query and read employees in your system and is relevant if your company wants to access and manage business partner data from external applications. If offers the operations FindBasicDataByIdentification, FindBiographicalDataByIdentification and FindByIdentification.
Here is an example of a simple web service request, which seeks first Five employees with an Employee ID starting with "E00".
<n0:EmployeeDataByIdentificationQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <EmployeeDataSelectionByIdentification> <SelectionByEmployeeID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryEmployeeID>E00*</LowerBoundaryEmployeeID> <UpperBoundaryEmployeeID></UpperBoundaryEmployeeID> </SelectionByEmployeeID> </EmployeeDataSelectionByIdentification> <PROCESSING_CONDITIONS> <QueryHitsMaximumNumberValue>5</QueryHitsMaximumNumberValue> <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator> <LastReturnedObjectID></LastReturnedObjectID> </PROCESSING_CONDITIONS> </n0:EmployeeDataByIdentificationQuery_sync>
Here is an excerpt of the response of the request above including one of five employees records returned by the query:
<?xml version="1.0"?> <n0:EmployeeDataByIdentificationResponse_sync xmlns:prx="urn:sap.com:proxy:ACL:/1SAI/TASBA84FA60747163FD5188:804" xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <EmployeeData> <ChangeStateID> 20130912162536.4368000</ChangeStateID> <UUID>00163e04-f8fb-1ed3-86f8-fe7215fd4b0a</UUID> <EmployeeID>7000012</EmployeeID> <BiographicalData> <ValidityPeriod> <StartDate>0001-01-01</StartDate> <EndDate>9999-12-31</EndDate> </ValidityPeriod> <GivenName>GivenNameTestPers-7215FD4B0A</GivenName> <FamilyName>FamilyNameTestPers-7215FD4B0A</FamilyName> <GenderCode>0</GenderCode> </BiographicalData> <AddressInformation> <UUID>00163e04-f8fb-1ed3-86f8-fe7216024b0a</UUID> <ValidityPeriod> <StartDate>0001-01-01</StartDate> <EndDate>9999-12-31</EndDate> </ValidityPeriod> <Address> <PostalAddress> <CountryCode>DE</CountryCode> <CityName>Pers-City-7215FD4B0A</CityName> <StreetPostalCode>67890</StreetPostalCode> <StreetName>Pers-Street-7215FD4B0A</StreetName> <HouseID>Pers-1</HouseID> <TimeZoneCode>CET</TimeZoneCode> </PostalAddress> <Telephone> <TelephoneFormattedNumberDescription>+49 (6227) PT7215FD4B0A-PTE</TelephoneFormattedNumberDescription> <NormalisedNumberDescription>+496227787215334202783</NormalisedNumberDescription> </Telephone> <Telephone> <TelephoneFormattedNumberDescription>+49 (170) PM7215FD4B0A</TelephoneFormattedNumberDescription> <NormalisedNumberDescription>+49170767215334202</NormalisedNumberDescription> <MobilePhoneNumberIndicator>true</MobilePhoneNumberIndicator> <SMSEnabledIndicator>true</SMSEnabledIndicator> </Telephone> <Facsimile> <Number> <AreaID>06227</AreaID> <SubscriberID>PF7215FD4B0A</SubscriberID> <ExtensionID>PFE</ExtensionID> <CountryCode>DE</CountryCode> <CountryDiallingCode>+49</CountryDiallingCode> </Number> <FormattedNumberDescription>+49 (6227) PF7215FD4B0A-PFE</FormattedNumberDescription> <NormalisedNumberDescription>+496227737212234332733</NormalisedNumberDescription> <DefaultIndicator>true</DefaultIndicator> </Facsimile> </Address> </AddressInformation> <EmploymentData> <UUID>00163e07-3d62-1ee4-ac8a-67387da69f10</UUID> <ChangeStateID>20150209120024.0354070</ChangeStateID> <EmploymentCountryCode>US</EmploymentCountryCode> <WorkAgreementData> <UUID>00163e07-3d62-1ee4-ac8a-67387da73f10</UUID> <ChangeStateID>20150209120024.0354070</ChangeStateID> <WorkAgreementID>3834/001</WorkAgreementID> <ValidityPeriod> <StartDate>2015-02-09</StartDate> <EndDate>9999-12-31</EndDate> </ValidityPeriod> <AdditionalClauses> <ValidityPeriod> <StartDate>2015-02-09</StartDate> <EndDate>9999-12-31</EndDate> </ValidityPeriod> <AgreedWorkingTimeRate> <DecimalValue>40.0</DecimalValue> <BaseMeasureUnitCode>WEE</BaseMeasureUnitCode> </AgreedWorkingTimeRate> <WorkAgreementTypeCode>1</WorkAgreementTypeCode> <WorkAgreementAdministrativeCategoryCode listID="US">1</WorkAgreementAdministrativeCategoryCode> </AdditionalClauses> <OrganisationalAssignment> <ValidityPeriod> <StartDate>2015-02-09</StartDate> <EndDate>9999-12-31</EndDate> </ValidityPeriod> <PositionAssignment> <ValidityPeriod> <StartDate>2015-02-09</StartDate> <EndDate>9999-12-31</EndDate> </ValidityPeriod> <PositionUUID>00163e07-3d62-1ee4-ac8a-67387d953f10 </PositionUUID> <PositionID>0209120022B</PositionID> <AssignmentPercent>100.0</AssignmentPercent> <OrganisationalCenterDetails> <ValidityPeriod> <StartDate>2015-02-09</StartDate> <EndDate>9999-12-31</EndDate> </ValidityPeriod> <OrganisationalCenterUUID>00145ef5-88e6-02eb-b8b3-ad37ab2c52cc</OrganisationalCenterUUID> <OrganisationalCenterID>MC22000</OrganisationalCenterID> </OrganisationalCenterDetails> <JobAssignmentDetails> <ValidityPeriod> <StartDate>2015-02-09</StartDate> <EndDate>9999-12-31</EndDate> </ValidityPeriod> <JobUUID>00145ef5-88e6-02db-b8b3-c5f6b51e81d9</JobUUID> <JobID>MC3420</JobID> </JobAssignmentDetails> </PositionAssignment> <ReportingLineUnit> <Id>MC22000</Id> <Name>Procurement</Name> </ReportingLineUnit> <CostCenter> <Id>MC22000</Id> <Name>Procurement</Name> </CostCenter> </OrganisationalAssignment> </WorkAgreementData> </EmploymentData> </EmployeeData> <ProcessingConditions> <ReturnedQueryHitsNumberValue>1</ReturnedQueryHitsNumberValue> <MoreHitsAvailableIndicator>false</MoreHitsAvailableIndicator> <LastReturnedObjectID>00163E04F8FB1ED386F8FE7215FD4B0A</LastReturnedObjectID> </ProcessingConditions> </n0:EmployeeDataByIdentificationResponse_sy
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.
The following example scenario can be carried out.
All employees are searched for that have the family name "Meier". However only the node "Common" that is valid on system date is returned.
<n0:EmployeeBiographicalDataByIdentificationQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <EmployeeBiographicalDataSelectionByIdentification> <SelectionByEmployeeFamilyName> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryName>Meier</LowerBoundaryName> </SelectionByEmployeeFamilyName> </EmployeeBiographicalDataSelectionByIdentification> <ProcessingConditions> <QueryHitsUnlimitedIndicator>true</QueryHitsUnlimitedIndicator> </ProcessingConditions> </n0:EmployeeBiographicalDataByIdentificationQuery_sync>
Response -
Response Here
Description | Find employees basic data using identification data |
Name | FindBasicDataByIdentification |
Synchronous | yes |
Release Status | Released |
To find employee basic data by identification.
The request message of the operation FindBasicByIdentification contains the EmployeeBasicDataSelectionByIdentification node that groups all possible selection parameters.
This node groups all selection parameters. The selection parameters are:
Selection Parameter | Remark |
---|---|
SelectionByEmployeeID | Selection by employee ID |
SelectionByEmployeeFamilyName | Selection by employee family name |
SelectionByEmployeeGivenName | Selection by employee given name |
SelectionByCreatedSinceDate | Selection by created since date |
SelectionByCreationIdentityID | Selection by creation identity ID |
SelectionByChangedSinceDate | Selection by changed since date |
SelectionByLastChangeIdentityID | Selection by last change identity ID |
SelectionBySearchText | Selection by search text (basic search) |
The response message contains the list of the found employees' biographical data, workplace address data, job assignment, log items, and processing conditions.
In this node, all found employees are contained, including the most important fields (for example UUID, EmployeeID, SystemAdministrationData). In addition the ChangeStateID may be needed for subsequent change requests via web services as well.
This node contains the most important fields of COMMON node (for example, FormOfAddress, FamiliyName, and GivenName).
Furthermore all customer fields, which have been added to node COMMON of BO Employee, are returned.
This node contains the most important fields of the EmployeeWorkplaceAddress (for instance Country, Street, Phone, MobilePhone, Fax, E-Mail, etc.).
This node contains the most important fields of the Job Assignment of an Employee (JobID, JobUUID, JobName and ValidityPeriod).
Description | Find employees biographical data using identification data |
Name | FindBiographicalDataByIdentification |
Synchronous | yes |
Release Status | Released |
To find employee biographical data by identification ("Common" node that is valid on system date).
The request message of the operation FindBiogByIdentification contains the EmployeeBiographicalDataSelectionByIdentification node that groups all possible selection parameters.
This node groups all selection parameters. The selection parameters are:
Selection Parameter | Remark |
---|---|
SelectionByEmployeeID | Selection by employee ID |
SelectionByEmployeeFamilyName | Selection by employee family name |
SelectionByEmployeeGivenName | Selection by employee given name |
SelectionByCreatedSinceDate | Selection by created since date |
SelectionByCreationIdentityID | Selection by creation identity ID |
SelectionByChangedSinceDate | Selection by changed since date |
SelectionByLastChangeIdentityID | Selection by last change identity ID |
SelectionBySearchText | Selection by search text (basic search) |
The response message contains the list of the found employee`s biographical data (Common instance node that is valid on system date), log items, and processing conditions.
This node contains all found employees including the most important fields of the COMMON node (FormOfAddress, FamiliyName, GivenName, etc.). Note that only the COMMON instance valid on system date will be returned. In addition the UUID, the EmployeeID and the ChangeStateID that may be needed for subsequent changes are also returned via web service.
Furthermore all customer fields that have been added to the COMMON node of the BO Employee will be returned.
Description | Find employees using identification data |
Name | FindByIdentification |
Synchronous | yes |
Release Status | Released |
To query employee data by elements.
FindByElements is an operation to query employee data by the selections elements passed in the request.
This node groups all selection parameters. The selection parameters are:
Selection Parameter | Remark |
---|---|
SelectionByEmployeeID | Selection by employee ID |
SelectionByEmployeeFamilyName | Selection by employee family name |
SelectionByEmployeeGivenName | Selection by employee given name |
SelectionBySearchText | Selection by search text (basic search) |
Interval Boundary Type Code for all these selection parameters are below.
Selection Parameter | Description |
---|---|
1 | Equal To |
2 | Between (excl. upper boundary) |
3 | Between |
4 | Between (excl. both boundaries) |
5 | Between (excl. lower boundary) |
6 | Less Than |
7 | Less Than or Equal to |
8 | Greater Than |
9 | Greater Than or Equal to |
For a successful search, the response contains the employees biographical, employment and work agreement related data along with the log items, and processing conditions.
In this node, all found employees are contained, including the most important fields of node COMMON (for example, FormOfAddress, FamiliyName, and GivenName). In addition the UUID, the EmployeeID and ChangeStateID may be needed for subsequent change requests via web services as well.
Furthermore all customer fields, which have been added to node COMMON of BO Employee, are returned.
In this node, all found employees are contained with data related to the employment (for example, employment country) and the work agreement (for example, agreed working hours), organizational unit and job. In addition, it returns the UUID, EmployeeID and ChangeStateID that may be needed for subsequent change requests via web services as well.
Example
This is a sample request for a simple wild card query and to return data of only one employee.
<n0:EmployeeDataByIdentificationQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <EmployeeDataSelectionByIdentification> <SelectionByEmployeeID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryEmployeeID>*</LowerBoundaryEmployeeID> <UpperBoundaryEmployeeID></UpperBoundaryEmployeeID> </SelectionByEmployeeID> </EmployeeDataSelectionByIdentification> <PROCESSING_CONDITIONS> <QueryHitsMaximumNumberValue>1</QueryHitsMaximumNumberValue> <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator> <LastReturnedObjectID></LastReturnedObjectID> </PROCESSING_CONDITIONS> </n0:EmployeeDataByIdentificationQuery_sync>
Here is an excerpt of the response of the request above including only first employee details returned by the query:
<?xml version="1.0"?> <n0:EmployeeDataByIdentificationResponse_sync xmlns:prx="urn:sap.com:proxy:A:/1SAI/TASBA84188:804" xmlns:n0="http://sap.com/xi/SG20/G"> <EmployeeData> <ChangeStateID> 20140312055326.6699050</ChangeStateID> <UUID>00163e04-dc33-1ed3-aab5-5409b48ebc01</UUID> <EmployeeID>7000051</EmployeeID> <BiographicalData> <ValidityPeriod> <StartDate>0001-01-01</StartDate> <EndDate>9999-12-31</EndDate> </ValidityPeriod> <GivenName>Service</GivenName> <FamilyName>Agent</FamilyName> <MiddleName>testingtoo</MiddleName> <NickName>Nicknametoo</NickName> <BirthName>Birthnametoo</BirthName> </BiographicalData> <AddressInformation> <UUID>00163e04-dc33-1ed3-aab5-5409b48f1c01</UUID> <ValidityPeriod> <StartDate>0001-01-01</StartDate> <EndDate>9999-12-31</EndDate> </ValidityPeriod> <Address> <PostalAddress> <CountryCode>US</CountryCode> <RegionCode listID="US">CA</RegionCode> <CityName>California</CityName> <StreetPostalCode>12345</StreetPostalCode> <StreetName>Street</StreetName> <HouseID>123</HouseID> <TaxJurisdictionCode listID="US">CA</TaxJurisdictionCode> <TimeZoneCode>PST</TimeZoneCode> </PostalAddress> <Telephone> <TelephoneFormattedNumberDescription>+1 6723296876</TelephoneFormattedNumberDescription> <NormalisedNumberDescription>+16723296876</NormalisedNumberDescription> <MobilePhoneNumberIndicator>true</MobilePhoneNumberIndicator> <SMSEnabledIndicator>true</SMSEnabledIndicator> </Telephone> <Telephone> <TelephoneFormattedNumberDescription>+1 1234567898</TelephoneFormattedNumberDescription> <NormalisedNumberDescription>+11234567898</NormalisedNumberDescription> </Telephone> <Email> <URI>serviceagent@test.com</URI> <DefaultIndicator>true</DefaultIndicator> </Email> </Address> </AddressInformation> </EmployeeData> <ProcessingConditions> <ReturnedQueryHitsNumberValue>5</ReturnedQueryHitsNumberValue> <MoreHitsAvailableIndicator>true</MoreHitsAvailableIndicator> <LastReturnedObjectID>00163E04DC331EE382DA7B27910F2E2E</LastReturnedObjectID> </ProcessingConditions> </n0:EmployeeDataByIdentificationResponse_sync>