cancel
Showing results for 
Search instead for 
Did you mean: 

Content Conversion

Former Member
0 Kudos

hi

I got this file

H 1100 9999 010206 010206 NZ ILS head1

L G 1 line 1 0008170000 1000 20 0000024909

L G 2 line 2 0008170010 500 20 0000024909

L V 3 line 3 0000100012 -1500 20 010206 0

H 1100 8888 010206 020206 NZ ILS head2

L G 1 txt1 0008170000 997 30 0000024909

L G 2 txt2 0008170010 502 30 0000024909

L V 3 txt3 0000100013 -1499 30 020206 0

i want to use content conversion to split it tp xml file (IDOC field which has 1 line of H and unbounded lines of l)

THE file can contain number of IDOCS

thx

shai

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Declare Header as structure n Item as table &

treat line starting with H as header n L as Line item..

giv

Record set struct as : HEADER,1,ITEM,*

Key field name : name of the 1st field

HEADER.keyFieldValue : H

HEADER.keyFieldInstructure : ignore

ITEM.keyFieldValue : L

ITEM.keyFieldInstructure : ignore

Header & ITEM.fieldNames

HEADER & Item field/ end Separator as: , & nl

u need n further info feel free 2 ask me..

Regards

Kishore

Former Member
0 Kudos

thx

where do I declare Header as structure and Item as a table?

Former Member
0 Kudos

Hi,

y do u wanno mention the item as table.i don think u can declare it has table anywhere in content conversion.just specify the occurance of the items in record structure.

regards

jithesh

Former Member
0 Kudos

when i use the keyfield it doesnt cr8 the file

and no error on the monitoring

Former Member
0 Kudos

hey,

when u give the keyfieldvalue give the values without quotes.don give the value within quotes..

header.keyfield--H

items.keyField--L

regards

jithesh

Former Member
0 Kudos

when I put H_Line,1,L_Line,* in Recordset

it doesnt cr8 the file

only when I put H_Line,1,L_Line,3

some1 knows y?

Former Member
0 Kudos

hi..

in the target message type u delcare it .

(Header as structure and Item as a table? )

i have done da same thing..

make sure that u define a common field say 'COMMON' in both the structures in the begining which will b used as key field.& give H n I without quotes..

tat shud solve ur prob..

Kishore

Former Member
0 Kudos

ok

but how can I define when does my IDOC ends?

IDOC starts with an H and ends with an H

I can do it without java mapping?

Former Member
0 Kudos

Hi,

U need not define how the idoc ends,the field structure will be created depending on the recordlines in the flat file.if ur last line of ur recordline start with H then IDOC will end with a header.

regards

jithesh

Former Member
0 Kudos

<?xml version="1.0" encoding="utf-8" ?>

- <ns:FLAT2XML_MT xmlns:ns="urn:com.ness.learn:FLAT2XML">

- <IDOC>

- <header>

<keyfield>H 1100 9999 010206 010206 NZ ILS head1</keyfield>

</header>

- <item>

<keyfield>L G 1 line 1 0008170000 1000 20 0000024909</keyfield>

</item>

- <item>

<keyfield>L G 2 line 2 0008170010 500 20 0000024909</keyfield>

</item>

- <item>

<keyfield>L V 3 line 3 0000100012 -1500 20 010206 0</keyfield>

</item>

</IDOC>

- <IDOC>

this is the file i get i cant sepreate btween fields

and thats y it doesnt work

Former Member
0 Kudos

its works thx

i should have used more fields ( empty tabS)

Former Member
0 Kudos

Hi,

first create a Data type with

<Idoc>

<Header>...0..1(represents line h)

<field1>(having the value H)

<contents>..0..ub(represents line l)

<field1>(Having the value L)

in content conversion

give ur the parameter as

DocumentName = message type name

RecordStructure = header,1,contents,*

keyfieldvalue = field1

then in the parameter column

header.fieldName=all the field names

header.fieldFixedLengths=all the fixed length

header.keyFieldValue=H

header.endSeparator='nl'

contents.fieldName=all the field names

contents.fieldFixedLengths=all the fixed length

contents.keyFieldValue=L

contents.endSeparator='nl'

if u have a field Separator as comma

then

header.fieldSeparator=,

contents.fieldSeparator=,

Can u tell me how u want to xml file to appear so that i can help u

regards

jithesh

Former Member
0 Kudos

Hi Shai,

Please take a look at these ..

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

/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem

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

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

cheers,

Prashanth

Former Member
0 Kudos

I have read all these

but they dont say how u can sepereate between lines

only in the same row