cancel
Showing results for 
Search instead for 
Did you mean: 

Best approach to develop DataTypes

Former Member
0 Kudos

Hey guys

suppose i m doin a complex File scenario in which i have a flat file either on the sender or receiver side.what is the best approach to develop the data type for the file structure,is it possible to generate an XML and with the help of that create a data type?

I actually want to know the professional way of generating datatypes (i m pretty sure in real world scenarios,we get very complex file structures).

thanx

Ahmad

Accepted Solutions (1)

Accepted Solutions (1)

moorthy
Active Contributor
0 Kudos

Hi,

In many cases, if your structure is very complex, you can not get direct nested xml after content conversion. In that case, in the mapping we need to handle the generation of nested strutcure. So you use Java or xslt mapping etc.. if it is not possible via graphical mapping. Also you can do this in the adapter module.

Here you go with good example- Generic Structure-

/people/sravya.talanki2/blog/2005/08/16/configuring-generic-sender-file-cc-adapter

Also file content conversion - limitations-

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/50061bd9-e56e-2910-3495-c5faa652...

Rgds,

Moorthy

Former Member
0 Kudos

Thanx Guys

i m not exactly talking about content conversion,suppose i m doing a complex File to IDOC scenario,now on my sender side i need to create Datatype for the sender file,but if the structure of the sender file is too complex,how will i create the DataType to start off with.

Is there a possibility that i can generate XML for the sender file even before i create the datatype?

also once my datatype is made,is thr a way i can check to see if it is created correctly?

thanx

ahmad

moorthy
Active Contributor
0 Kudos

Hi,

If the File Structure is very complex, then you need to go with generic strutcure, which is mentioned in earlier blog. That blog has clear mention of this.

You can not create xml before it reached into File adapter for a flat files.

<u>

also once my datatype is made,is thr a way i can check to see if it is created correctly?</u>

>>>You can test only during mapping or content conversion. But you can verify thru the structure given in the file and whatever you have created.

Rgds

Moorthy

Former Member
0 Kudos

Thanx Krishna

Answers (1)

Answers (1)

Former Member
0 Kudos

To develop a XML structure out of Flat file you need to use the File content conversion feature provided in XI.With that you can convert CSV as well as Fixed length kind of flat files to XML structure.It even takes care of Rows will unequal no of records in each line item.

Follow these examples weblogs to appreciate this feature

https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1092- [original link is broken] [original link is broken] [original link is broken] [original link is broken] Fixed Length

/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns - CSV with Unequal column

File Receiver with Content Conversion

/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

Bipin