Landscape / System Details:
SAP PI Version: SAP Netweaver 7.30 &Single Stack | |
SFSF BizX Entity : CompoundEmployee | |
Source System: Non SAP - SOAP System | Target System: File System |
Target Audiance :
1. Consultant want to integrate Third-parties with SFSF BizX.
2. Consultant want to know How to call Client WSDL in Java Mapping.
Document Objective:
Sample Scenario : Query Employee Data from SFSF - CompoundEmployee Entity.
The document provides a step by step execution of test scenario "querying employee information from SFSF Biz X - CompoundEmployee Entity".
This process can be resused for other entities too.
Requirements as per FD :-![Image 3.JPG]()
Implemented Solution :
All above said requirement can be full filed by using Employee compound application programming interface (API) for SuccessFactors' Employee Central.
The service is used to extract employee data out of Employee Central. This API allows you to easily integrate data with external systems and applications.
The API compound Employee selects multiple entities related to an employee and returns all data in hierarchically-structured response XML with the employee person data as the root node.
Select items
The select items are a list of all entities to be returned as part of the hierarchical query result xml. The restriction of fields is not supported.
The following sub-structures are supported:
person
personal_information
address_information
phone_information
email_information
person_relation
employment_information
job_information
compensation_information
paycompensation_recurring
paycompensation_non_recurring
payment_information
accompanying_dependent
alternative_cost_distribution
job_relation
direct_deposit
national_id_card
Where expression
The where expression can be used to filter the query result. The compound API does not support expressions with complex conditions on several fields and different logical operators.
The API supports the following fields and operators:
Field Remark Valid Operators
LAST_MODIFIED_ON
COMPANY_TERRITORY_CODE
PERSON_ID
PERSON_ID_EXTERNAL
COMPANY
EMPLOYEE_CLASS
DEPARTMENT
DIVISION
BUSINESS_UNIT
LOCATION
JOB_CODE
PAY_GROUP
EFFECTIVE_END_DATE
Note : There is no SAP ECC System involved in this Scenario.
Technical Solution:
This document explains the configuration of SAP PI scenario which can be used for query employee data. Entire process consisting of the login, logout, query and QueryMore operation on SF Side.
Above Screenshot: Integration solution to integrate Non SAP System with SFSF to File System using SAP PI Middleware.
Third Parties and SAP PI integrated through SOAP (HTTP) and FTP connector.
SAP PI to SFSF connection has been maintained in Java Mapping using Java Class "SOAPConnectionFactory" class and its family.
All calls are Asynchronous in nature between SAP PI and Third-Party.
All calls are Synchronous in nature between SAP PI and Successfactors.
SFSF Demo Endpoint URL: https://salesdemo4.successfactors.com:443/sfapi/v1/soap
Above Screenshot: Operation Mapping has two mappings added in it
1. Java Mapping : Establish connection from Successfactor and based on Select request Query it will return the Intermediate Response XML Data.
2.Graphical Mapping : Perform transformation function returned response XML Data and finally pass it to Target File Communication channel.
Technical Solution
Step 1. Source System triggers the process with Select Query XML Data.i.e. here Source System is Webservice Navigator or SOAP UI.
Step 2. Data will be received to SAP PI using SOAP [HTTP] Sender adapter.
Step 3. Then this Select Query and SF Credentials XML Source Data will be passed to Java Message Mapping.
Step 4. Java Message mapping is written to perform Login , Query , Query more , Logout opreations and pass the Intermediate XML response / result to Next Mapping of Opeartion Mapping.
4.1. A successful login will return a session ID as Lookup Response.
4.2. Then this cookie must be passed back to all subsequent SF API Operation Calls in order to authenticate.
4.3. Then we will call the Select Query Opeartion to fetch employee data. There is a limitation of 800 records in one call.
4.4. We can check this on the basis of hasMore parameter. If it comes as true then we will call the queryMore operation to fetch remaining records on the basis of QuerySessionID parameter.
4.5 Again there is limitation of 800 records in one call. So we will have to call step 4.4 in loop until hasMore paramter comes as false.
Step 5. Later Intermediate XML Data fetched during 4.1 to 4.5 step will be passed to graphical Mapping to handle the transformations and finally pass it to Target Communication channel.
Step 6. Target Adapter or Communication Channel will create a Response XML file on FileSystem.
Important points to consider before setting up Integration scenario between SAP PI and SFSF interface are following :-
1. Opening firewall unidirectional port 443 from SAP PI to SFSF
2. Being B2B - Secure call this would need security Certificates in Trusted CA and WebStore.
3. You may not have Axis protocol in your SAP PI Box. Get it deployed explicitly.
Note : Please follow <Click Here> to get more information on above points.
PI ESR Object Development Overview
Source Message Type : Request
Message Type is created to carry select query and username/password/company id from source side.
Select query can be dynamic all the time but should be in proper syntax.
Username-Password -Company will be used to get the sessionID from SFSF.
Intermediate Message Type : CompoundAPI_XSD
XSD is created based on structure similar to CompoundEmployee Entity and uploaded in External Defination.
You can use tool like Altova XMLSpy to handle such cases.
Target Message Type : Employee_Response_MT
Message Type is created on the basis of Target file Struture given in FD.
Create Outbound and Inbound Asynchronous service interface.
Name : WSDLCalling_Async_Out
Name: WSDLCalling _Async_In
Message Mappings:
Java Mapping : Source XML to Intermediate XML.
Establish connection from Successfactor and based on Select request Query it will return the Response XML Data.
Name: com/sap/integration/sfsf/CompundWSDLMapping_New
Graphical Mapping:Intermediate XML to Target Message Type.
Perform transformation function returned response XML Data and finally pass it to Target File Communication channel.
Name: CompoundAPI_MM
ROperation mapping - There are two message mappings in one operation Mapping.
Name : OperationMapping_WSDLCalling_JavaMapping
Due to Size limitation rest will be continued to PI.DOC - Successfactors BizX Integration using PI Java Mapping – Query Operation on CompoundEmployee Entity - Part II