cancel
Showing results for 
Search instead for 
Did you mean: 

Receiver File Adapter - File Content Conversion Problem

Former Member
0 Kudos

I am using file content conversion for the first time, using a very simple example to try to get working.

I read the file in okay, a CSV file and try to write out, via FTP a flat file.

The payload I can see is :

<?xml version="1.0" encoding="utf-8" ?>

<ns:MT_EXCEL xmlns:ns="http://hillarys.co.uk/TEST">

<Worksheet>

  <Row>

   <Column1>Col1</Column1>

   <Column2>Col2</Column2>

  </Row>

  <Row>

   <Column1>R1C1</Column1>

   <Column2>R1C2</Column2>

  </Row>

</Worksheet>

</ns:MT_EXCEL>

On the File content converson I have

Recordset Structure      Row

Row.fieldNames            Column1, Column2

Row.fieldFixedLengths 10,10

Row.addHeaderLine     0

the output is just one line

Col1       R1C1

It seems to be not picking up the second column.

What am I doing wrong ?

Thanks

Paul

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

I thank everyone for their suggestions and links to the SAP help.

But is there anyone who can explain why I am not getting the second column in the output.

Thanks

Paul

Former Member
0 Kudos

I have worked out what was wrong and have it working now.

Here is correct file content parameters should anyone be interested

former_member208404
Participant
0 Kudos

Hi Paul,

The problem could be with your structure. We all know that the File Content Conversion doesn't works with more than 3 levels of hierarchy.

Since your structure contains the data at the 4th level, it might be messing up the conversion.

DT_EXCEL/Worksheet/Row/Column1

Try reducing it to 3 levels i.e.

DT_EXCEL/Row/Column1.

Regards

Abhishek

former_member190624
Active Contributor
0 Kudos

Hi Paul,

Try configuring receiver file channel as below,

Refer below help document for more details,
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

Regards

Hari.

Former Member
0 Kudos

No that does not work either, I now get the output

Col1      ;R1C1    

former_member190624
Active Contributor
0 Kudos

Can you please give screen shot of your receiver  Data type/ Message Type?

Former Member
0 Kudos
Former Member
0 Kudos

When I set Recordset Structure to Row,*

I get error message

Conversion initialization failed:
java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters
found: Parameter '*.fieldFixedLengths' or '*.fieldSeparator' is missing

This is a receiver, your screen prints appear to be a sender adapter.

Former Member
0 Kudos

Hi Paul,

Did you added field fixed length parameter.

Thanks,

Satish.

Former Member
0 Kudos

yes,

On the File content converson I have

Recordset Structure      Row

Row.fieldNames            Column1, Column2

Row.fieldFixedLengths 10,10

Row.addHeaderLine     0

Former Member
0 Kudos

Hi Paul,

As mentioned above, you are reading .CSV file.So

Add this below lines and try again

Recordset Structure ---> row,*

row.fieldNames                    Column1,Column2

row.endSeparator                  'nl'

row.fieldSeparator                   ,

row.fieldContentFormatting     nothing

ignoreRecordsetName           true

Thanks

Dhileep

Former Member
0 Kudos

Hi Paul,

Can you add endSeperator parameter and try once.

Thanks,

Satish.

Former Member
0 Kudos

I have now added the endSeperator parameter and there is no change.  Output still the same.

former_member207622
Contributor
0 Kudos

Recordset Structure      Row,*

Row.fieldNames            Column1, Column2

Row.fieldFixedLengths 10,10

Row.addHeaderLine     0

put record set structure as Row,*

Recordset name as Worksheet

Former Member
0 Kudos

The reading of the CSV file is okay and working correctly.

I am trying to write the contents to a flat file, this is where I am having problems.

The XML contains all the data from the CSV.

Former Member
0 Kudos

No Recordset field is available to set as Worksheet.  It is a receiver adapter.

gagandeep_batra
Active Contributor
0 Kudos

hi Paul,

did you put like that

Row.endSeperator = 'nl'

or paste your screen shot here

Regrds

Gagan

Former Member
0 Kudos

For Receiver FTP adapter,

These below codes may helpful to trasfer the xml to text format

Recordset Structure ----- Root

Root.fieldFixedLengths10,10
Root.fieldNamesColumn1,Column2
Root.endSeparator'nl'
Root.fixedLengthTooShortHandlingCut
Former Member
0 Kudos
gagandeep_batra
Active Contributor
0 Kudos

hi paul

can you try without fieldNames becasue it' fixed length  no need to define that i think....

Regards

gagan

Former Member
0 Kudos

No, that does not work.

gagandeep_batra
Active Contributor
0 Kudos

Hi Paul,

as ninad said use record set structure as Row,*,

and use ignoreRecordsetName = true as below:

here i am not using fixed length.

for more information check below:

http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

Regards

Gagan

former_member207622
Contributor
0 Kudos

The Row is repeating twice , Put the recordset structure as Row,*

Thanks

Ninad Sane