cancel
Showing results for 
Search instead for 
Did you mean: 

file content conversion

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hey

just remove the following from ur parameters

S_ISA.fieldNames D_I01,D_I02,D_I03

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

S_GS.fieldNames D_479,D_142,D_124

S_GS.fieldFixedLengths 2,10,11,10,

it should work,

also why do u have a comma(,) in the end here S_GS.fieldFixedLengths 2,10,11,10,

and no comma (,) in the end for S_ISA.fieldFixedLengths 2,11,2,11,2

if it still does not works then u might wanna look at ur sender XML file,ur XML and the data type do not confirm to each other.

thanx

ahmad

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

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

Former Member
0 Kudos

HI,

Try

Record structure : S_ISA,*

S_ISA.beginSeparator = ISA

S_ISA.endSeparator = 'nl'

S_ISA.fieldSeparator = ,

S_ISA.ignoreRecordStructure = true

Regards

Chilla

Former Member
0 Kudos

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.

Former Member
0 Kudos

hey Pullarao

AFAIK the solution u suggested might not work,it wont display ISA in the Output file.

thanx

ahmad

Former Member
0 Kudos

Hi Ahmad,

xml file :

<Customer>

<name> </name>

<city> </city>

</Customer>

FCC Parameters in receiver adapter:

Record Set Structure : Customer

Customer.addHeaderLine 0

Customer.fieldSeparator *

Customer.endSeparator 'nl'

For above config,i'm getting output as below,

selva*chennai

raj*hyd

kumar*bnglr

Like above config mr.sriram also get..output as he need

<S_ISA>

<D_001>ISA<//D_001>

<D_I01>00</D_I01>

<D_I02></D_I02>

<D_I03>00</D_I03>

</S_ISA>

I need to display in the format

ISA00 00*

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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