Handling Referenced XSDs in SAP PI
This objective of this guide snippet is to provide a detailed implementation of handling referenced XSDs in SAP PI.
Issue: When we get the XSD nested structure / zipped file, we would need to reference the main XSD to its nested sub structures to use their corresponding fields in the main object.
Above screenshot refers to the main document (zip file) given by the client
The References are as below:
“IAXSAPVendVendTable_IAXSAPVendVendTableServiceupdate_main_v4” references “entityKeyList”
Again entityKeyList references entityKey
Above screenshot refers to its referenced structure within in the zipped file.
Above screenshot refers to the main document:
which has the reference of “entityKeyList” and “IAXSAPVendVendTable_IAXSAPVendVendTableService.update_v4” files.
Again XSD structure “entityKeyList” has a
referenced structure “entityKey” as shown in the screenshot below.
Below steps depict the creation of necessary objects in ESR:
Step 1: First create the Orphan substructures which doesn’t have any referenced structure.
Create an external definition : “VendorUpdate_entityKey”
While importing the XSD substructure, ensure you give the imported file name in the “Source” field.
Step2: Now create the parent /referenced object “VendorUpdate_entityKeyList” as shown below:
In the referenced tab, please give the referenced XSD file name (in this case it is entityKey.xsd)
Note: As, we need this XSD to be referred in the main document, copy the file name under “Source”
Step 3: Create external definition VendorUpdate_V4, our second orphan XSD by importing
IAXSAPVendVendTable_IAXSAPVendVendTableService.update_v4.xsd file from folder location which is referenced by the main XSD structure.
Copy the same name and paste in the Source i.e. IAXSAPVendVendTable_IAXSAPVendVendTableService.update_v4.xsd
as per the referred screenshot below.
Step 4 :
Now import the main XSD using an external definition (parent node) named VendorUpdate_Main_V4 and import the corresponding zipped file referred in screenshot 1.
The referenced XSD substructures are referred in the below screenshot.
Now we can view the referenced structures and their corresponding fields below.
All the corresponding referenced fields now appear.