cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI 7.31: Error in Content Conversion FLAT to XML in FTP-Senderadapter

Former Member
0 Kudos

Hello,

I am currently facing a problem where I can not find a solution. I have a incoming flat file that needs to be converted to a xml file. Therefore I have used the content conversion but I am getting the following error and the file is not picked up from the source directory:

The file looks like this and has always only this one line in it:

The message type is created like this:

The content conversion is the following:

Does anyone of you have faced this probem befor and can help me finding a solution for it?

regards

Christian

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

sorry for the delay. I have been working on another procject and didn't had the time for this issue.

I have added the line

ignoreRecordsetName = true

as Eng suggested. But still it is not working. I see the correct mapped file in the monitoring:

But the file is not created with the following error:

The content conversion in the sender adapter is set like that

I really don't have a clue why it is not working

regards

Christian

Former Member
0 Kudos

Hi,

You can give a try as per the response which I previously gave in this current thread.

Regards,

Souvik

Former Member
0 Kudos

Hi,

I am useing the same message type for sender and receiver. I have mapped all the fields one by one. Now I have set the Node and the first element as constant:

But now I am gettng the following error:

But still the file looks ok in the monitoring but is not created.

Former Member
0 Kudos

Hi Christian,

For both the target elements which are there in the mapping screenshot, you can try using "map with default" ,i.e.,  you can map the constant with the target elements via "map with default".

This will in fact not suppress the target element and hence it must get created.

Regards,

Souvik

engswee
Active Contributor
0 Kudos

Christian

You have a prefix before ignoreRecordsetName. Remove that. Just enter below as is without anything else

ignoreRecordsetName = true

Rgds,

Eng Swee

Answers (7)

Answers (7)

Former Member
0 Kudos

Hi,

Please check note -

799657 - Error message CANNOT_PRODUCE_ELEMENT in message mapping

Thanks,

Atul

Former Member
0 Kudos

I have updated the whole scenario but without any luck. The file doesn't get created. But I can see the conversion in the Adapter Log:

Error in Workbench;

Message Type:

Current content conversion parameter.

What is wron here?

regards

Christian

former_member193386
Active Contributor
0 Kudos

For File Content Conversion is necessary a recordsetStructure, in you Message Type You need to add this node, for example

MT_XXXX

- RecordSet

-- Freightcosts

Do this and run again.


Dont forget to put the name "RecordSet" on Record Set Name field

Former Member
0 Kudos

Hi Christian,

In message mapping, kindly check which source field is mapped to the target segment "Freightcosts".

That segment might be missing in the payload.

Hope this helps!

Regards,

Souvik

engswee
Active Contributor
0 Kudos

Hi Christian

Your Message Type definition does not match the output generated by the FCC configuration. Noticed that there is an additional level with "Recordset" in the XML at MS step. The mapping fails because of the difference between actual payload and structure expected by message mapping.

As I have mentioned in my earlier reply, please add the following to the FCC configuration parameters:-

ignoreRecordsetName = true

Rgds

Eng Swee

Former Member
0 Kudos

I believe the issue has been resolved by adding this parameter.

0 Kudos

Dear Christian,

  In flat file fields are more than you declare as i see there are 7 fields in the file and you have declared only 5 fields add two more fields in content conversion it will work

Former Member
0 Kudos

Now I got it working that the file is pciked up but it is generated with empty content. But the firts mapping steps are correct:

Mapping MS:

Mapping AM

Any Ideas?

Regards

Christian

engswee
Active Contributor
0 Kudos

In your MS step, there are two levels of Freightcosts in the generated XML. Try removing the entry in Recordset Name on the FCC tab.

Also add the following parameter:-

ignoreRecordsetName = true

Former Member
0 Kudos

Hi Christian,

Just to add on to what Eng suggested, go through the conversion part of below link once,

SAPTechnical.COM - File Content Conversion

Thanks,

Arthita

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Christian,


The file looks like this and has always only this one line in it:

The specified line contained 6 elements. Your FCC only specified 5.


The content conversion is the following:

Regards,

Mark

engswee
Active Contributor
0 Kudos

Hi Christian

For the fieldNames configuration, use comma as a separator instead of ;

If it's just one line, you also don't need the keyFieldValue parameter.

Rgds

Eng Swee