Skip to Content
avatar image
Former Member

file content conversion receiver adapter

Hi All,

I have a xml file with the following structure

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Apr 12, 2006 at 07:57 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 12, 2006 at 08:06 AM

    Hi Sorabh,

    Just noticed that your XML structure is a bit confusing 😊

    <u>

    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>

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

    Anyway i assume your XML to be

    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 ;

    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 ...

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 17, 2006 at 07:32 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 17, 2006 at 07:43 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Sourabh,

      In you receiver side content conversion, do not give

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

      regards

      Vijaya

  • avatar image
    Former Member
    Apr 18, 2006 at 06:20 AM

    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

    Add comment
    10|10000 characters needed characters exceeded