SAP Process Integration XSD Tool Using PHP
This blog is about the PHP tool to convert the CSV file which contains information like node, elements, data types etc.. in to XSD file. The generated file can be further used in Middleware integration tools like SAP Process Integration/SAP PI.
Refer the blog SAP Process Integration JDBC Format XSD Tool for JDBC format.
- Basic knowledge of PHP.
- Basic knowledge of SAP PI.
This is used in EAI projects where we have a list of elements/nodes in a CSV/XLS format which we need to add manually into any EAI/middleware tool to create a data source/target structure. To overcome this I’ve developed the code in PHP for converting CSV to XSD format. This will ease half of our work, instead of manually creating all the elements. Since the XSD can be imported into most of the EAI middleware tools for creating the corresponding message structures.
WAMP is a Windows web development environment. It allows you to create web applications with Apache, PHP and the Mysql database
- XSD Converter tool is mainly developed to reduce the effort of manually creating the data types in SAP PI.
- The Converter tool will take the input as a CSV file. The CSV file contains the list of nodes to be created in SAP PI with element name, max, min occurrences, data type and length (optional). So the CSV file should be in the attached template format. For more details refer the file format section.
- The Tool will generate the output as a “XSD File”. We can import the XSD file in to SAP PI.
- The code will read the entire CSV file and generate the XSD file which contains elements, data types, Min & Max Occurrences and Length (optional).
- After downloading the tool, extract the CSV_XI_XSD zip files to the root folder /www/
- We can access the tools main page through http://localhost/CSV_XI_XSD/upload_csv.php
- Upload the CSV file using Browse option and provide the details like IR- data type name, namespace and number of levels.
- After submitting we can get a XSD file.
- We can import the XSD file to the Data types using the import file option available in the XI middleware tool.
- Ideally created XSD file can be imported into SAP PI middleware tool.
- After importing we can add / edit the elements manually if required.
- The elements which contain attributes are omitted (we need to insert the attributes manually).
Installables can be downloaded from
Please feel free to share your thoughts and suggestions in the comments below!
Follow me on Google+