cancel
Showing results for 
Search instead for 
Did you mean: 

Create Data Type from XSD

Former Member
0 Kudos

Hi

Is there any way of creating a PI data type directly from an XSD?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

No- Data type is created manually-

chirag

Former Member
0 Kudos

Damn. Thanks anyways, i was just hoping for some magical way of doing it instead of having to create it manually, its quite an effort for huge XSD's

Former Member
0 Kudos

Never tried that option suggested by Biswa but with that option u can import the XSD.....try that..

My apology for wrong info.

chirag

Edited by: Chirag Gohil on Feb 16, 2011 4:01 PM

Former Member
0 Kudos

I tried to import the xsd but it just says 'Schema to be handled does not contain a definition of type <name of datatype>'

Former Member
0 Kudos

I think in this case u need to slightly modify the XSD schema--

For example -This is the schema generated with the data type when u create it manually---

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="XXX:Siebel:Campaign" targetNamespace="XXX:Siebel:Campaign">

<xsd:simpleType name="Datatype Name">

<xsd:restriction base="xsd:anySimpleType" />

</xsd:simpleType>

</xsd:schema>

can u modify the XSD with this line <xsd:simpleType name="<Put data type name here>">

and end this with </xsd:simpleType>

give a try --

chirag

Edited by: Chirag Gohil on Feb 16, 2011 4:18 PM

Former Member
0 Kudos

You should be able to create data type from XSD, but why you want to create data type here instead of going with External Definition??

Still if you want to go with data type means,

open the XSD and modify like, <xsd:complexType name="Name of the data type which u would like to create">

Try to import now, it should work

Regards

Former Member
0 Kudos

I modified the xsd so that PI would recognise it, replacing xs: with xsd and simpletype with complextype etc. etc. So it works now.

The reason why i wanted to build a data type from an xsd is that i need to use the data type in a data type enhancement and enhancements dont take external definitions as types when you create them thus i needed a 'manually' created data type.

Thanks for all the help!

Former Member
0 Kudos

I suppose with simple type also it should have worked...have u tired the changes which I have told u...

chirag

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi ,

I know this thread is answere but would like to share a good blog with you.

We face a hard time creating big DT (esp in Idoc scenraio's) in SAP PI...please refer the tool in the following blog and import the XSD directly in DT editor in PI:

/people/liang.ji/blog/2009/03/03/data-type-generator

hope you will like it...thanks to Liang ji

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>Is there any way of creating a PI data type directly from an XSD?

Yes.

PI gives very flexibility in creating data types... You can create XSD externally as you want and import it as external definition. You can also reuse that data type for different namespaces too.

Note: Use better tool like XMLSPY to create the schema definition.

aashish_sinha
Active Contributor
0 Kudos

import XSD as External Definitions and you need not create Data type and message type. create SI only.

Thanks

Aashish sinha

Former Member
0 Kudos

Hi Riaz,

Please go through the following link:

/people/liang.ji/blog/2009/03/03/data-type-generator

It might help you.

Thanks

Biswajit

Former Member
0 Kudos

Hi 007biswa

Thats a cool tool but it doesnt do what i need. I have an XSD and i want to create a data type directly from it without having to type in all the fields manually.

Former Member
0 Kudos

did u try directly importing the XSD using import option.......it will work ....

chirag