Very common task during the establishment of the IT Service Management processes and especially Incident Management is the integration of the SAP Service Desk with the already existing tools. As many of you may know, there is the standard web services interface ICT_SERVICE_DESK_API. It is described well in its’ whitepaper.
In theory, everything is very easy, you just need to perform the steps specified in SPRO:
- Create the technical user that will be used to call the web service
- Activate service ICT_SERVICE_DESK_API in the transaction SICF
- Configure the service provider for the service ICT_SERVICE_DESK_API in SOAMANAGER (steps are described in the IMG activity documentation)
- Configure Service Consumer. If the application has the SOAP API, provide the WSDL If the integration is one way only (from application to SolMan) and you don’t have external interface and WSDL – skip this step
And now we reached the tricky part. We need to register the external help desk in the ICTCONF. This is necessary to get the GUID of the external application. And to get this GUID the external application needs to implement the SOAP interface with RequestSystemGUID function. This function needs to provide response with the unique number and this would be enough to do the registration.
After the implementation of the function is finished, reconfigure the logical port (step 4 of IMG), go to ICTCONF transaction and add new system.
Just fill the required information (Service desk name and logical port created on step 4) and continue:
But some applications (SOAPUI as an example) the SOAP interface or implementation of the function, so we cannot use the ICTCONF transaction as this transaction will do the RequestSystemGuid request and receive error. In this case we can fill the table ICT_SYSCONF manually:
- The THIRD PARTY GUID can be any random generated value.
- LOGICAL PORT is the port you created in step 4. If you skipped that step because no SOAP API available, just put some random name here.
- NAME is the name of your application, you can choose any.
Next step after registering the external application for the ICT_SERVICE_DESK_API is to create the value mapping. And this should be done even if the values are the same in both applications.
This is done via the SPRO:
Select “Value Mapping (2)” on the next screen:
The minimum requirement is to map the values for the priority and for the text type which is done in this activity.
First, let’s map the priority. Add the new entry to the table and fill in required internal (value in Solution Manager) and external (value in external application) values:
Repeat the procedure for all the priority values:
Basically this is enough and you can proceed to call the service and it should work. But some not-mandatory parameters also could be added to the incident. The most common are different text for the descriptions, business impact and so on. To be able to pass this information you can map the values of the text types:
Now we can use the 3rd party interface to create the incident:
- Register the SOAP interface in your application via Solution Manager WSDL file (to find it go to SOAMANAGER -> Web services configuration, find your provider and click “Open binding WSDL configuration”)
- Perform the RequestSystemGuid function to get the Solution Manager GUID. The Request XML should look like this:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:soap:functions:mc-style"> <soapenv:Header/> <soapenv:Body> <urn:RequestSystemGuid/> </soapenv:Body> </soapenv:Envelope>
In the response you will receive the GUID of Solution Manager. This should be stored and then used for the future API calls:
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"> <soap-env:Header/> <soap-env:Body> <n0:RequestSystemGuidResponse xmlns:n0="urn:sap-com:document:sap:soap:functions:mc-style"> <Errors/> <SystemGuid>0050569E758F1ED398E3D8C3084C8624</SystemGuid> </n0:RequestSystemGuidResponse> </soap-env:Body> </soap-env:Envelope>
3. To create the incident the ProcessIncident function should be used. It is well described in the whitepaper. The example call looks like this:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:soap:functions:mc-style"> <soapenv:Header/> <soapenv:Body> <urn:ProcessIncident> <IctAdditionalInfos/> <IctAttachments/> <IctHead> <IncidentGuid><Unique value for the incident GUID</IncidentGuid> <RequesterGuid>0050569E758F1EE49B819F6374359E11</RequesterGuid> <ProviderGuid>0050569E758F1ED398E3D8C3084C8624</ProviderGuid> <AgentId></AgentId> <ReporterId>1</ReporterId> <ShortDescription>Test WS incident creation</ShortDescription> <Priority>2</Priority> <Language>RU</Language> <RequestedBegin>20150310130000</RequestedBegin> <RequestedEnd>20150410130000</RequestedEnd> </IctHead> <IctId>3</IctId> <IctPersons> <item> <PersonId>1</PersonId> <PersonIdExt>dummy1</PersonIdExt> <Sex></Sex> <FirstName>Victor</FirstName> <LastName>Palkin</LastName> <Telephone> <PhoneNo></PhoneNo> <PhoneNoExtension></PhoneNoExtension> </Telephone> <MobilePhone></MobilePhone> <Fax> <FaxNo></FaxNo> <FaxNoExtension></FaxNoExtension> </Fax> <Email>firstname.lastname@example.org</Email> </item> </IctPersons> <IctSapNotes/> <IctSolutions/> <IctStatements> <item> <TextType>SU99</TextType> <Texts> <item>This is a test from SOAP UI</item> <item>incident was created successfully</item> </Texts> <Timestamp>20150310124800</Timestamp> <PersonId>1</PersonId> <Language>ru</Language> </item> </IctStatements> <IctTimestamp>20150310124800</IctTimestamp> <IctUrls/> </urn:ProcessIncident> </soapenv:Body> </soapenv:Envelope>
If everything was configured correctly, you should receive the response with the id of created incident and mapped id of the requester:
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"> <soap-env:Header/> <soap-env:Body> <n0:ProcessIncidentResponse xmlns:n0="urn:sap-com:document:sap:soap:functions:mc-style"> <Errors/> <PersonMaps> <item> <PersonId>1</PersonId> <PersonIdExt>0000000343</PersonIdExt> </item> </PersonMaps> <PrdIctId>8000008790</PrdIctId> </n0:ProcessIncidentResponse> </soap-env:Body> </soap-env:Envelope>
And now you can see the new incident in the CRM UI:
The ICT_SERVICE_DESK_API can be used for much more complex scenarios, all the possibilities are described in the whitepaper.