cancel
Showing results for 
Search instead for 
Did you mean: 

file content conversion receiver adapter

Former Member
0 Kudos

Hi All,

I have a xml file with the following structure

<ns0:INBOUND_material_MT xmlns:ns0="https://sapretail-pos.com/materialdata">

<PU01>

<matnr>11111</matnr>

<PU02>

<Date>20060412</Date>

<value>100</value>

<PU02>

<PU02>

<Date>20060412</Date>

<value>200</value>

</PU02>

</PU01>

</ns0:INBOUND_SALEDATA_MT>

I want everything as a single line (tab seperated)

(111111 20060412 100 20060412 200)

in file content conversion i gave the recordset structure as PU01 and occurense for pU02 as 0...2.

It is also possible that in Pu02 in first segment the date may not be there.

how can i get the text file.

the occurence for Pu02 is 0..2 but i am not getting all the recods

any help

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Guys,

Thanks for the help,,it didn't work with the solution specified in the blog because the data is not consistent however i figured out the solution.

If u change the context of the fields to the parent segment and create a single segment structure for the txt file it is working

reg

Former Member
0 Kudos

Hi Sorabh,

I did understand your problem now.So you want content conversion at the receiver end and that is basically to get the entire data in one line.For that please go through these links below.It clearly explains your requirement.

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

http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm

Regards,

abhy

Former Member
0 Kudos

Hi Sourabh,

In you receiver side content conversion, do not give

content.endsperater. I think eveything would come in a single line

regards

Vijaya

Former Member
0 Kudos

Guys I have tried this option but its not working.

the structure is like

<pu01>

matnr

<pu02>

field1

field2

</pu02>

<pu02>

field1

field2

</pu02>

<pu01>

The problem is i want everything in a single line. it does come for single record but pu01 can repeat n number of times

Shabarish_Nair
Active Contributor
0 Kudos

Hi Sorabh,

Just noticed that your XML structure is a bit confusing

<u>

<b><ns0:INBOUND_material_MT xmlns:ns0="https://sapretail-pos.com/materialdata"></b></u>

<PU01>

<matnr>11111</matnr>

<PU02>

<Date>20060412</Date>

<value>100</value>

<PU02>

<PU02>

<Date>20060412</Date>

<value>200</value>

</PU02>

</PU01>

<u><b></ns0:INBOUND_SALEDATA_MT></b></u>

Anyway i assume your XML to be

<ns0:INBOUND_material_MT xmlns:ns0="https://sapretail-pos.com/materialdata">

<PU01>

<matnr>11111</matnr>

<PU02>

<Date>20060412</Date>

<value>100</value>

</PU02>

<PU02>

<Date>20060412</Date>

<value>200</value>

</PU02>

</PU01>

</ns0:INBOUND_material_MT>

you can add a tag for matnr and modify the XML to like ;

<ns0:INBOUND_material_MT xmlns:ns0="https://sapretail-pos.com/materialdata">

<PU01>

<b><MAT><matnr>11111</matnr></MAT></b>

<PU02>

<Date>20060412</Date>

<value>100</value>

</PU02>

<PU02>

<Date>20060412</Date>

<value>200</value>

</PU02>

</PU01>

</ns0:INBOUND_material_MT>

which will help you convert the XML into a flat file ...

Shabarish_Nair
Active Contributor
0 Kudos

you dont have to specify the occurance in case of receiver adapter,

in your recordset structure provide

PU01,PU02

and in the Cont. conve. parameter provide details like

field separator and end separator.

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