Skip to Content
avatar image
Former Member

file content conversion

Hi

I have an xml file

<LIST>

<S_ISA>

<D_I01>00</D_I01>

<D_I02></D_I02>

<D_I03>00</D_I03>

</S_ISA></LIST>

I need to display in the format

ISA00 00

I am able to display as

00* *00

But i need to get even ISA initially as segment similarly i have so many segements & fields.

Any help would be highly appreciated.

Thanks

sri

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • avatar image
    Former Member
    Apr 11, 2007 at 09:44 PM

    Hey

    add the following to ur parameters

    S_ISA.beginSeparator = ISA

    similarly u can do for other tags too

    thanx

    ahmad

    Message was edited by:

    Ahmad

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Or, you can create a target XML by changing the datatype to include another element which you can map the value "ISA" to it.

      Example:

      <LIST>

      <S_ISA>

      <D_001>ISA<//D_001>

      <D_I01>00</D_I01>

      <D_I02></D_I02>

      <D_I03>00</D_I03>

      </S_ISA>

      </LIST>

      Regards,

      Bill

  • avatar image
    Former Member
    Apr 12, 2007 at 02:02 AM

    Hi,

    U can try like this in your file adapter config. using FCC.

    Recordset Structure : LIST,S_ISA

    Name Value

    S_ISA..addHeaderLine 0

    S_ISA.fieldSeparator *

    s_ISA.endSeparator 'nl'

    Thanks

    Rao.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hey Pullarao

      the solution u suggested wont add ISA in the beginning,even in ur display ur not getting name before selva*chennai.

      sriram actually wants output in the following format

      ISAselvachennai and ur solution will dispaly only selva*chennai

      moreover the XML which u quoted in ur reply is not da one Sriram has.

      hope u got my point

      thanx

      ahmad

      Message was edited by:

      Ahmad

  • avatar image
    Former Member
    Apr 12, 2007 at 05:00 AM

    HI,

    Try

    Record structure : S_ISA,*

    S_ISA.beginSeparator = ISA

    S_ISA.endSeparator = 'nl'

    S_ISA.fieldSeparator = ,

    S_ISA.ignoreRecordStructure = true

    Regards

    Chilla

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 12, 2007 at 06:24 PM

    Thanks for the responses

    This is my input xml

    <LIST>

    - <S_ISA>

    <D_I01>00</D_I01>

    <D_I02 />

    <S_GS>

    <D_479>PR</D_479>

    <D_455>X</D_455>

    <D_480>004010</D_480>

    </S_GS>

    </S_ISA>

    </LIST>

    I need to display out put as

    isa00 *

    gsprx*004010

    I am able to get 1 segment when i am tring to dislay other segments i have an error

    consistency error :more field found in xml structure than specified in content conversion

    The paramaters i have used

    S_ISA.fieldNames D_I01,D_I02,D_I03

    S_ISA.beginSeparator ISA

    S_ISA.fieldFixedLengths 2,11,2,11,2

    S_ISA.fieldSeparator *

    S_ISA.endSeparator nl

    S_GS.fieldNames D_479,D_142,D_124

    S_GS.beginSeparator GS

    S_GS.fieldFixedLengths 2,10,11,10,

    S_GS.fieldSeparator *

    S_GS.endSeparator nl

    Any help would be highly appreciated

    Thanks

    sri

    Add comment
    10|10000 characters needed characters exceeded

    • Recordset structure:S_ISA,S_GS

      S_ISA.fieldFixedLengths 10,10,10

      S_ISA.fixedLengthTooShortHandling 'Cut'

      S_ISA.FieldSeparator *

      S_ISA.EndSeparator \r\n

      S_GS.fieldFixedLengths 10,10,10

      S_GS.fixedLengthTooShortHandling 'Cut'

      S_GS.FieldSeparator *

      S_GS.EndSeparator \r\n

      Hope Its help.

      Rgds

      RP

  • avatar image
    Former Member
    Apr 13, 2007 at 03:22 PM

    Hi

    I am able to display output as 1 line but i need line break at PO & it need to start with GS

    ISA00 00 12503598 125123493800 0606261728U004010000010P>GSPO5598512340200606261728196X004010

    Any help would be highly appreciated..

    Thanks

    sri

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 13, 2007 at 04:50 PM

    Hey RP

    I need to do a line break in between any paramaters to define becuase i have tried to doing using using your paramaters its not working the problem here is xml file which i am getting is like in 1 xml isa i have

    <LIST>

    - <S_ISA>

    <D_I01>00</D_I01>

    <D_I02 />

    <D_I03>00</D_I03>

    <D_I04 />

    <D_I05>?</D_I05>

    <D_I06></D_I06>

    <D_I05_2>ZZ</D_I05_2>

    <D_I07></D_I07>

    <D_I08></D_I08>

    <D_I09></D_I09>

    <D_I10>U</D_I10>

    <D_I11>3</D_I11>

    <D_I12>000000001</D_I12>

    <D_I13>0</D_I13>

    <D_I14>T</D_I14>

    <D_I15>></D_I15>

    - <S_GS>

    <D_479>PR</D_479>

    <D_142>SENDER ID</D_142>

    <D_124>RECEIVER ID</D_124>

    <D_373>2007/04/11</D_373>

    <D_337>2007/04/11</D_337>

    <D_28>1</D_28>

    <D_455>X</D_455>

    <D_480>004010</D_480>

    - <S_ST>

    <D_143>850</D_143>

    <D_329>1</D_329>

    - <S_BEG>

    <D_353 />

    <D_92 />

    <D_324></D_324>

    <D_373>empty</D_373>

    </S_BEG>

    - <G_SN1>

    - <S_N1>

    <D_98>SE</D_98>

    <D_93></D_93>

    </S_N1>

    </G_SN1>

    - <G_SPO1>

    - <S_PO1>

    <D_330>5.000</D_330>

    <D_355>EA</D_355>

    <D_212>9.95</D_212>

    <D_639>1</D_639>

    <D_235>IN</D_235>

    <D_234></D_234>

    </S_PO1>

    </G_SPO1>

    - <G_SPO1>

    - <S_PO1>

    <D_330>1.000</D_330>

    <D_355>EA</D_355>

    <D_212>9.95</D_212>

    <D_639>1</D_639>

    <D_235>IN</D_235>

    <D_234>11128/30</D_234>

    </S_PO1>

    </G_SPO1>

    -- <G_SPO1>

    - <S_PO1>

    <D_330>1.000</D_330>

    <D_355>EA</D_355>

    <D_212>9.95</D_212>

    <D_639>1</D_639>

    <D_235_3>MN</D_235_3>

    <D_234_3>910788</D_234_3>

    </S_PO1>

    </G_SPO1>

    - <S_SE>

    <D_96>empty</D_96>

    <D_329>empty</D_329>

    </S_SE>

    </S_ST>

    </S_GS>

    - <S_IEA>

    <D_I16 />

    <D_I12 />

    </S_IEA>

    </S_ISA>

    </LIST>

    ANd the flat file has to be

    ISA00 00 125032337598 125123493800 0606261728U004010000002710P>~

    GSPO50323375985123493800200606261728196X004010~

    ST850000000207~

    ..............

    and the other segments

    I hope this is clear now

    Thanks for your help..........

    sri

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      HI,

      Try the following parameters ...

      Record Structure : S_ISA,,S_GS,,<b> here put all segments names , *</b>

      parameters are as follows

      S_ISA.fieldNames D_I01,D_I02,D_I03

      S_ISA.beginSeparator ISA

      S_ISA.fieldFixedLengths 2,11,2,11,2

      S_ISA.fieldSeparator *

      S_ISA.endSeparator nl

      S_GS.fieldNames D_479,D_142,D_124

      S_GS.beginSeparator GS

      S_GS.fieldFixedLengths 2,10,11,10,

      S_GS.fieldSeparator *

      S_GS.endSeparator nl

      apply each of above list for all segments ..

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

      Regards

      Chilla