cancel
Showing results for 
Search instead for 
Did you mean: 

Read DataType Definition in a Java Mapping,

Former Member
0 Kudos

Hi,

Is there a way to load a DataType Definition and parse the fields and attribute of this data type from java code?

I am in a custom Adapter Module (PI 7.1) and need to dynamically load the definition of a DataType to do some FCC.

I would like to do the FCC based on the DataType definition rather then on the Communication Channel's adapter module configuration.

Thanks,

Martin

Accepted Solutions (0)

Answers (2)

Answers (2)

RaghuVamseedhar
Active Contributor
0 Kudos

Hi Martin Lavoie,

You can use these modules (StrictXml2PlainBean, PayloadZipBean) one after one, in communication channels. http://help.sap.com/saphelp_nwpi711/helpdata/en/cd/5af7c0c994e24fb0d0088443513de2/frameset.htm

As said in earlier response, feature in PI 7.3 is to validate payload with the reference to XSD in Message Type from ESR not for direct access of XSD.

u201Cthen convert the codepageu201D, can you explain in detail. Please explain the scenario in detail, so that everyone can understand it end to end, to help better.

Regards,

Raghu_Vamsee.

RaghuVamseedhar
Active Contributor
0 Kudos

Hi Martin Lavoie,

I understand, you are getting a flat file and want to convert it into XML or the other way, converting XML to flat file in SAP PI 7.1 using File channel.

First, why you are going for Adapter module? (I think even you don't like it) It is resource intensive to develop, running in production system, maintain. If already there is an adapter module, leave it as it is. Consider using Java mapping over adapter module. Java mapping is relatively less resource intensive to develop, running in production system, maintain. Java mapping can do the payload conversion what you are planning to do in adapter module. If you write adapter module (generic), you have to use it in interfaces (all channels) where you need to transform the payload. If you write java mapping (generic), you can use it in operational mapping in all interfaces where you need payload transformation, along with other graphical mappings.

Second, as of now, there is no way to access Data type XSD (which are declared in ESR) using SAP PI. In PI 7.1 EHp1 payload validation using XSD can be done, by placing XSD file in folder on PI server. From PI 7.3, validation is based on Data type (XSD) defined in ESR. First place, you are interested in payload transformation not payload validation. So there is no way you can access XSD in ESR from Adapter module dynamically. I guess you can upload XSD along with adapter module, but maintenance in not all easy.

Finally, I donu2019t recommend adapter module for you requirement. Try using FCC. You may say whenever there is change in XSD (change in field lengths), you have to change FCC (edit the channel), and I donu2019t see better option than this. If you think FCC will not be sufficient for your requirement, and then go for Java mapping. Writing generic java mapping will be a good challenge. Java mapping should be uploaded with XSD (or parameter file) for every interface and should be edited if there is a change in XSD.

Regards,

K_Raghu_Vamsee

Edited by: Raghu Vamsee on Jan 7, 2011 12:28 AM

Former Member
0 Kudos

Thanks for your answer Raghu Vamsee,

I was going to go with uploading the XSD somewhere but then I'll need to maintain all the Data Type in 2 seperate places.

I can't use only FCC because I need to do some data manipulation before the FCC.

I am receiving EBCDIC COMP (compressed) fields that I need to "unzip" and then convert the codepage before using FCC, because it plays on the len of the fields.

I'll look forward to this feature in 7.3, thanks for the insight.

Martin