cancel
Showing results for 
Search instead for 
Did you mean: 

DAT file conversion

markbernabe
Active Participant
0 Kudos

Hi gurus,

Is it possible to convert DAT file to XML using PI? Has anyone tried that before?

Thanks in advance!

Accepted Solutions (1)

Accepted Solutions (1)

subhro_de
Active Participant
0 Kudos

HI Mark,

If the hierarchy of the xml is not deeper than three levels File content conversion available with sender file adapter should be ok for your requirement :

You may want to look into the link below for an example :

http://saptechnical.com/Tutorials/XI/Contentconversion/page1.htm

Regards

Subhro

markbernabe
Active Participant
0 Kudos

Hi Subhro,

Thanks for the tip. I confirm that FCC also works for DAT files.

BR Mark

Answers (3)

Answers (3)

markbernabe
Active Participant
0 Kudos

Thanks everyone for the inputs. I'll give FCC a spin and I hope it will work for this scenario. I'll keep you posted.

iaki_vila
Active Contributor
0 Kudos

Hi Mark,

If you can do it in Java, you can do it in PI. Depending if the file is a flat file with structure or not you can use or not a standard solution.

Regards.

Former Member
0 Kudos

Hi Mark,

It really depends on the type of data contained in the DAT file. DAT files can contain anything from video to application settings.

It's impossible to answer you question without knowing more details about the file.

Kind regards,

Koen

markbernabe
Active Participant
0 Kudos

Hi Koen,

It's like an ordinary text file. If I change it to .txt, I can open it without issues.

Former Member
0 Kudos

Hi Mark,

That still leaves a lot of possibilities: a text file can contain all kinds of formats, such as XML, character separated values, ..., ... .

Can you post an example?

iaki_vila
Active Contributor
0 Kudos

Hi Mark,

While it is a .txt  file, even if there isnt a structure you can read all the with FCC dealing all file like only one tag and later in the operation mapping step using java mapping or message mapping will transform it in a structured XML. If the file is structured you can create a XML more structured directly in the FCC.

Regards.

markbernabe
Active Participant
0 Kudos

Hi Koen,

It looks something like this. So it really just looks like a typical text file, actually more of a CSV type but this one only has space to separate the values.

1  1234                    HELLOWORLD   1234567890 

Former Member
0 Kudos

Mark,

In that case you can use Content Conversion in SAP PI to read the file and convert it to XML.

See http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm for more information on content conversion.

Kind regards,

Koen