Skip to Content
Author's profile photo PrasannaKrishna Mynam

Third-party Cloud Integration via SAP PI: Customized Framework to Integrate SAP to Third-Party Cloud (ZUORA) Part – 2–1

This blog emphasizes technical approach for integrating SAP ECC with third-party cloud (ZUORA), so far we have cover the process flow of integration and business expectation. ZUORA has several API options where other systems connecting to it can avail to interact with this. For each transaction to perform like Invoice/Account/Billing a separate object has allotted.

SOAP API calls perform CRUD actions on API objects, following are the sequence of calls to be performed on Objects.

  • Logging in to the Zuora server Use login call to allow you receive information for subsequent calls, this includes 2 step process where you will have session token as response when you perform login call to server.
  • Creating, updating, and deleting various types of information. Use the create, update, or delete call
  • Querying account information. Use the query call, this query call is in the form of SQL statement to fetch information from specific object.

Syntax:- select <fieldid1>, <fieldid2> from <object> where […]

  There are certain limitation imposed while using this query call as all keywords must be in lower case and limitation of records is 2000(100 records for WSDL v5). It’s recommended to have this scheduled at regular intervals to avoid any kind of size issues.

Proposed Integration Framework:

Integration framework in SAP ECC has classified based on objects and each proxy is generated for specific object information fetching, Wrapper program can be schedule at specific time interval as it’s designed to fetch ZUORA object information (i.e. Invoice/Account/Invoice Item etc…) in query form and post retrieved data to respective BAPI fields.

Query needs to be formed with requested fields in wrapper program and this should be passed to corresponding proxy as querycall() request.

Wrapper needs to perform following to retrieve with query call, this is sync call.

  • Fetch the Invoice header data(Id, Account Id , Inovoice Number, Due date, Invoice Date  where Status = ‘Posted’ )  from Zuora system by using the method SI_OUTBOUND_INVOICEZCO_SI_OUTBOUND_INVOICE and pick the data into internal table it_invhead.
  • Fetch the Invoice item data(data(InvoiceId,  RatePlanChargeId, Quantity, UOM,SI_OUTBOUND_INVOICE_ITEM_DETAI  of class ZCO_SI_OUTBOUND_INVOICE_ITEM_D and Pick the data into internal table it_invitem.

  • Fetch the Production rate plan charge field  data for pull the material field from Zuora system. Call the  method SI_OUTBOUND_RATE_PLAN_CHARGE of the class ZCO_SI_OUTBOUND_PRODUCT_RATE_P  and  Pick the data into internal table it_invprod.

  • Fetch the Product rate plan charge id  by using the field Production rate plan ,here call the method SI_OUTBOUND_PRODUCT_RATE_PLANZCO_SI_OUTBOUND_RATE_PLAN_CHAR
  • Fetch the Customer number by using method SI_OUTBOUND_ACCOUNT of the class ZCO_SI_OUTBOUND_PRODUCT_RATE_P
  • Fetch the Contact information from Zuora  to use the method SI_OUTBOUND_CONTRACT of class ZCO_SI_OUTBOUND_RATE_PLAN_CHAR  into internal table it_contval.


Integration Framework in SAP PI is designed based on object categories available and needs to be access from ZUORA API using SOAP API call, this require to download third-party’s WSDL file, this is a generic WSDL for all the SOAP API calls.

In order to perform querycall() there is need to tweak WSDL structure so that it can accommodate appropriate response from third-party, this step enables to perform response mapping from third-party to ECC system, unless we perform this step its not feasible to map response payload.

As shown in the following screen shot zObject element has dynamic string, this needs to be replaced according to specific object in query Response as shown in following figure.


Once you have service interface created upon modified WSDL we are good  to proceed with mapping, as third-party also has session handling while requesting the response, we need to have the login service call followed by request querycall();

Following are the steps  illustrated in following figure.

  • Java mapping is used to embed login request’s sessionId into original querycall() request to sent to third-party, also there is need to remove PI payload format and embed SOAP header to request, this needs to have java code to strip off  xml tags and name spaces.

  • Modified WSDLs imported into PI enabled to catch response payload from third-party and used for subsequent mapping purpose. These values are passed to corresponding proxy call’s import parameters in ECC system.


This is easily customizable as custome fields added in third-party can be added in imported WSDL, there is feasibility to  add SAP fields for instance as field  TransferredToSAP__c can be added in third -party system and same can be added to WSDL in order to form mapping. So far we haven’t faced any issues regarding performance also we are trying to implement more interfaces using this frame work, its been couple of moths and haven’t heard any defects. Hope this blog helps to handle similar requirements for you too.

How-to document is created to give you implementation details.

How to Document for Third party Cloud Integration with SAP ECC using SAP PI: Custom Designed Framework 

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Very well articulated.. Thanks for sharing this ..

      Did you tried exploring the Axis adapter module ? which can help to store the session information.similar for the SuccessFactors integration.

      On a overall thumbs up to your design..



      Author's profile photo Former Member
      Former Member

      Great blog. Thank you for sharing this information.