cancel
Showing results for 
Search instead for 
Did you mean: 

RECEIVER file CONTENT CONVERSION

Former Member
0 Kudos

Hello friends,

I have the following structure,

<root>

<nameA>

<value1>value</value1>

<value2>value</value2>

<value3>value</value3>

<nameB>

<value4>value</value4>

<value5>value</value5>

</nameB>

</nameA>

</root>

Here I need to convert this structure into a flat file. Here I am using RECEIVER FILE CONTENT CONVERSION to create a CSV file.

Can any help me in content conversion?

Thanks in advance,

-kanth.

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

You has posted the same question yesterrday in this thread, did you read through the replies?

If the answer was not clear, you can ask for clarification in the same thread so that one does not need to give you the same replies all over again.

Regards

Bhavesh

Former Member
0 Kudos

Hi bhavesh,

I thought I was not very clear in my previous post.

I got replies for sender file adapter but where here its receiver file adapter in my requirement. Just want to elaborate my question I have posted it again.

Thanks,

-kanth.

bhavesh_kantilal
Active Contributor
0 Kudos

Srikanth,

I was in now way discouraging you from posting questions here on SDN. What I wanted to highlight was that people had answered your question and even if you thought it was wrong / people had misunderstood your question , if you had posted it in your thread it would have been benefiical to one and all. At times using the same thread does help.

And, coming to your question, the answers are for Receiver File Adapter.

If you see the strucutre in the online help and cross comapre it with your strcuture, you will note that you are using a Nested Strcuutre. NAMEB is within NAME A .

As far i know, this strcuture is not supported and you should consider changing the datatype so that NAME B and NAME A are on the same level.

If you do this , then the content conversion will work with the parameters pointed .

Regards

Bhavesh

Former Member
0 Kudos

Bhavesh,

I the output file I am able to find first field of each repetitive node.

For example,

<root>

<nameA>

<value1>value1</value1>

<value2>value2</value2>

<value3>value3</value3>

<nameB>

<value4>value14</value4>

<value5>value15</value5>

</nameB>

<nameB>

<value4>value24</value4>

<value5>value25</value5>

</nameB>

<nameB>

<value4>value34</value4>

<value5>value35</value5>

</nameB>

</nameA>

</root>

In my output file,

Value1, Value2, Value3, Value14, Value24, Value34

You have any idea on this? What could be the problem?

Thanks,

-kanth.

bhavesh_kantilal
Active Contributor
0 Kudos

can you give us the content conversion parameters that created the output shouwn above?

regards

Bhavesh

Former Member
0 Kudos

These are the parameters i mentioned,

Record Structure:nameA

nameA.fieldSeparator:,

nameA.endSeparator:'nl'

thanks and regards,

-kanth.

Former Member
0 Kudos

Hi srikanth,

Try as below..

Recordset Name : root

Record structure : nameA,1,nameB,*

Recordsetspermessage : *

processing parameters :

ignoreRecordsetNames: true

nameA.fieldNames : give field names

nameA.fieldseparator : ,

nameB.fieldseparator : ,

OR

ignoreRecordsetNames: true

nameA.fieldNames : give field names

nameA.fieldfixedlength : give field lengths

nameB.fieldfixedlength : give field lengths

Regards

Chilla..

bhavesh_kantilal
Active Contributor
0 Kudos

Chilla,

The setting you have given are for Sender File Adapter.

They are not for Receiver File Adapter.

Regards

Bhavesh

Former Member
0 Kudos

Hi,

Oh thanks Bhavesh..

Try the below..

Record structure : nameA,1,nameB,*

processing parameters :

nameA.fieldseparator : ,

nameB.fieldseparator : ,

Regards

Chilla..

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks you all.

These are the possible solutions,

1. Java mapping

2. Changing the structure.

I went for 2 options, changing the input structure.

Thanks Bhavesh for you reply.

Cheers,

Srikanth.

Former Member
0 Kudos

HI,

I hope this is repeating question..

The same structure was given in help.sap.com for file adapter content conversion receiver side.. please see that help , sure you will get an idea..

In receiver side the structure is

<root>

<nameA>

<value1>value</value1>

<value2>value</value2>

<value3>value</value3>

<nameB>

<value4>value</value4>

<value5>value</value5>

</nameB>

</nameA>

</root>

Recordset and record structure names are the same root .Use this name..

Or try to pull this structure into under one more recordstructure node then you can do it..

Actually it depends upon the imput file structure also.

try..

nameA.field separator is ","

nameA.ignorerecordset is true.

nameA.endseperator : 'nl'

nameB.field separator is ","

nameB.ignorerecordset is true.

nameB.endseperator : 'nl'

or use fixedfieldlength and give the field lengths.. instead above fieldseparator,endseparator..

Please see the below links ..

http://help.sap.com/saphelp_nw2004s/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC

/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns - FCC

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file - FCC

/people/harrison.holland5/blog/2006/12/20/xi-configuration-for-mdm-integration--sample-scenario - FCC

/people/shabarish.vijayakumar/blog/2006/04/03/xi-in-the-role-of-a-ftp - FCC

/people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy - FCC

/people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter - EOIO - File

http://help.sap.com/saphelp_nw04/helpdata/en/ee/c9f0b4925af54cb17c454788d8e466/frameset.htm - cc

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/da1e7c16-0c01-0010-278a-eaed5eae... - conversion agent

Other wise keep entire structure under one recordset node and use that nodefor content conversion.

Regards

Chilla..

<i>Points rewarded if it is helpful..</i>

bhavesh_kantilal
Active Contributor
0 Kudos

><i>The same structure was given in help.sap.com for file adapter content conversion receiver side.. please see that help , sure you will get an idea..</i>

The Strcutres are different,

Help.sap. strcuture is,

<root>

<nameA>

<value1>value</value1>

<value2>value</value2>

<value3>value</value3>

<b></nameA>

<nameB></b>

<value4>value</value4>

<value5>value</value5>

</nameB>

</root>

His Receiver Strcuture is,

<root>

<nameA>

<value1>value</value1>

<value2>value</value2>

<value3>value</value3>

<b><nameB></b>

<value4>value</value4>

<value5>value</value5>

<b></nameB>

</nameA></b>

</root>

As far as I know this strucutre is not supported by the Receiver File adapter and the strcuture would need to be changed as per help.sap. and then the content conversion parametrs provided above will work fine.

Regards

Bhavesh

Former Member
0 Kudos

HI,

You did not mention about your target structure.

Check this link.

http://help.sap.com/saphelp_nw2004s/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

Regards,

Sudheer

Former Member
0 Kudos

Try this way by giving the following conversion parameters in Reciever Adapter.

RecordSetStructure :nameA,nameB

nameA.fieldSeparator ,

nameA.endSeparator 'nl'

nameB.fieldSeparator ,

nameB.endSeparator 'nl'

Regards,