cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with file content conversion

Former Member
0 Kudos

Hello,

I have the following scenario file-XI-Proxy ABAP, I pick up one text file and send it to XI, the txt file has to be converted to the following xml structure:

<REGISTRO_TIPO_1>

<TIPO_REG></TIPO_REG>

<COMPANY></COMPANY>

<COD_ERROR></COD_ERROR>

<BLANCOS></BLANCOS>

<RECORD_TYPE_2>

<COMPANY></COMPANY>

<ORDEN></ORDEN>

<NUMBER></NUMBER>

</RECORD_TYPE_2>

<RECORD_TYPE_2>

<COMPANY></COMPANY>

<ORDEN></ORDEN>

<NUMBER></NUMBER>

</RECORD_TYPE_2>

<RECORD_TYPE_1>

RECORD_TYPE_2(0..unbounded) is a substructure of RECORD_TYPE_1(0..unbounded), and RECORD_TYPE_1 has another fields as well as RECORD_TYPE_2.

My problem is that i dont know how to achieve this complex structure with file content conversion. I would be very glad if someone could help me, with the content conversion parameters I should use.

Thank you very much.

Luis

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

The nested strcuture shown in your question is not supprted by the file adapter's content conversion.

2 options,

1. Either write an Adapter Module and write the logic to convert the source TXT file into the XML strcuture you want. ( Would not recommend this though as making any changes can become cumbersome )

2. Change the Datatype format to the format shown in the online SAP library as that is the format in which you can create the datatype using File adapters.

Regards,

Bhavesh

Answers (2)

Answers (2)

agasthuri_doss
Active Contributor
0 Kudos
Former Member
0 Kudos

Does really anybody never have to do a xml-structure like that one?? I cant find any kind of documentation with examples of complex structures, only there is some documentation in the online help, and doesnt help too much...

Former Member
0 Kudos

Hi Luiz,

Your source file, is it a XML or CSV file ?

If it's an XML I think Content Conversion is not needed: just create the same Data Type.

Mickael