cancel
Showing results for 
Search instead for 
Did you mean: 

Content Conversion in File Receiver Adapter

Former Member
0 Kudos

Hi,

I am doing a Content Conversion in File Receiver Adapter.

Input to the Adapter is:

<ns1:FileResponse_MT xmlns:ns1="http://www.bpmtest.com/bpm">

<OrderID>123</OrderID>

<Quantity>98</Quantity>

<Price>76.23</Price>

</ns1:FileResponse_MT>

Desired output is: <b>OrderID# Quantity# Price (123#98#76.23)</b>

I tried to accomplish this with different settings in ‘Recordset Structure’ and ‘Conversion Parameters’ but could not achieve it, every time an empty file is produced.

Would appreciate any help on this.

Best Regards,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Enclose your structure with a parent element like this.

<ns1:FileResponse_MT xmlns:ns1="http://www.bpmtest.com/bpm">

<parent>

<OrderID>123</OrderID>

<Quantity>98</Quantity>

<Price>76.23</Price>

</parent>

</ns1:FileResponse_MT>

Then give the parameters, it will work.

parent.fieldSeparator = '#'

parent.endSeparator = 'nl'

Regards,

P.Venkat

Answers (7)

Answers (7)

Former Member
0 Kudos

I got the desired output by wrapping all child elements in an element.

<b> Thanks Guys for all your quick responses.</b>

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

>><b>Desired output is: OrderID# Quantity# Price (123#98#76.23)</b>

Adding to the discussion, this output will not be possible,.

The options discusses above will create an output,

<b>123#98#76.23</b>

it will not be possible to create the field names in the output and this can be achieved bu pushing the fieldnames into some field!

Regards

Bhavesh

Former Member
0 Kudos

Chandra,

Have a Parent Node and do ur Content conversion

<ns1:FileResponse_MT xmlns:ns1="http://www.bpmtest.com/bpm">

<Record>

<OrderID>123</OrderID>

<Quantity>98</Quantity>

<Price>76.23</Price>

</Record>

</ns1:FileResponse_MT>

In ur Communication channel give:

RecordSet Structure: Record

Record.fieldSeparator: #

Record.endSeparator: 'nl'

Regards,

Sudharshan

Former Member
0 Kudos

As you guys mentioned, I can try the option "wrapping all elements in an root element " .

However, is there any other option to achieve this without modifying the input data?

Shabarish_Nair
Active Contributor
0 Kudos

You will require a root node. Else you cannot acheive content conversion here.

<i>However, is there any other option to achieve this without modifying the input data? </i>

>>>

all you need is to change your target structure.

Former Member
0 Kudos

no, since it should have record structure, and record elements to get file content conversion correctly. go through this link below.

http://help.sap.com/saphelp_nw2004s/helpdata/en/0b/9a50465ccf84479e39a6d50c90fb3f/frameset.htm

Former Member
0 Kudos

Hi,

Add a root element to hold all the orders and try.

Regards,

Sudheer.

Shabarish_Nair
Active Contributor
0 Kudos

i doubt if you can apply FCC to that structure.

Make a additional node in the target structure and then try FCC on it.

<ns1:FileResponse_MT xmlns:ns1="http://www.bpmtest.com/bpm">

<b><node></b>

<OrderID>123</OrderID>

<Quantity>98</Quantity>

<Price>76.23</Price>

<b></node></b>

</ns1:FileResponse_MT>

Former Member
0 Kudos

go through this blog. This tells you how to do that.

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

Former Member
0 Kudos

I tried based on the weblog, but i did not get the output i wanted. it may be because my input XML has all elements under the root element.

Message was edited by:

chandra kalva