cancel
Showing results for 
Search instead for 
Did you mean: 

File Content conversion for Fiexed length output file

Former Member
0 Kudos

Hi,

I am Working on Idoc to File scenario.

I would like to know the content conversion partmenrts for the follwoing structure.

Structrure is as below:

Message Type

Header Record 1..unbounded

. Field1 0...1

. Field2 0...1

. Field3 0...1

.. Detaillines 0...unbounded

... Field3 0..1

... Field4 0..1

.. Detaillines2 0..unbounded

... Field6 0...1

... Field7 0...1

Can you please advise.

Regards,

Manoj Kumar

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

I worked with field fixed length option.

vikas_agarwal
Contributor
0 Kudos

Hi Manoj,

Try this Content Conversion parameters:

RecordSet Structure - Header,, Detaillines1,, Detaillines2,*

Header.addHeaderLine - 0

Header.fieldFixedLength- Length of Field1,Field2,Field3

Header.endSeparator-'nl'

Detaillines1.addHeaderLine - 1

Detaillines1.fieldFixedLength - length of Field4, Field5

Detaillines1.endSeparator -'nl'

Detaillines2.addHeaderLine - 2

Detaillines2.fieldFixedLength - length of Field6, filed7

Detaillines2.endSeperator- 'nl'

regards

Vikas

Message was edited by:

Vikas Agarwal

Former Member
0 Kudos

Hi Vikas,

I used the content conversion, but i landed with the follwing error.

Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter '.fieldFixedLengths' or '.fieldSeparator' is missing

Please advise.

Thanks and Regards,

Manoj

Former Member
0 Kudos

Hello Manoj

<i>.fieldFixedLengths' or '.fieldSeparator'</i> you should specifey either one fo this.

In your case,

if output file ask fieldsepator, then use *.fieldSeparator'

or els you use *.fieldFixedLengths'

Regards,

Ramesh P

Message was edited by:

Ramesh Parashivamurthy

Former Member
0 Kudos

Hi,

I used the follwing parameters.

HeaderRecord.fieldFixedLengths 1,1,10,2,4,12,3,1,9,1,4,1,1,1,2,1,4,4,2,3,1,8,4

HeaderRecord.fieldNames field name with comma seperator

HeaderRecord.endSeparator 'nl'

HeaderRecord.fixedLengthTooShortHandling ignore

Detaillinesforeachpart.fieldFixedLengths 1,1,10,12,7,49

Detaillinesforeachpart.fieldNames fieldnames with comma seperatoer

Detaillinesforeachpart.endSeparator 'nl'

Detaillinesforeachpart.fixedLengthTooShortHandling ignore

Trailerrecord.fieldFixedLengths 1,79

Trailerrecord.fieldNames field names with comma seperator

Trailerrecord.endSeparator 'nl'

Trailerrecord.fixedLengthTooShortHandling ignore

Please let me know, if some thing to be added.

Regards,

Manoj

Former Member
0 Kudos

hi,

Have you given Recordset Structure as

HeaderRecord,Detaillinesforeachpart,Trailerrecord

Also add

HeaderRecord.addHeaderLine - 0

Detaillinesforeachpart.addHeaderLine - 0

Trailerrecord.addHeaderLine - 0

Regards,

Ramesh P

vikas_agarwal
Contributor
0 Kudos

Hi Manoj,

As you are using fieldFixedLengths no need of FieldSeparators.

U have to only add

HeaderRecord.addHeaderLine - 0/1

Detaillinesforeachpart.addHeaderLine - 0/1

Trailerrecord.addHeaderLine - 0/1

Regards

Vikas

Former Member
0 Kudos

Hi,

I want the output as follwing.

Field1field2field3....................and so on.

I am using FCC as fieldSeperator.

Any advise on this.

Regards,

Manoj

Former Member
0 Kudos

RecordSet Structure = Header,,Detaillnes,,Detaillines2,* is the right one.

But stantosh ain't those fcc parameters for file as sender ? In this case itz receiver .

Cheers

<b>*RAJ*

Shabarish_Nair
Active Contributor
0 Kudos

<i>Header Record 1..unbounded

. Field1 0...1

. Field2 0...1

. Field3 0...1

.. Detaillines 0...unbounded

... Field3 0..1

... Field4 0..1

.. Detaillines2 0..unbounded

... Field6 0...1

... Field7 0...1</i>

>>

Is Detaillines & Detaillines2 under the node Header ? Or is it at the same level as of Header ?

If Detaillines & Detaillines2 are under the node Header, you cannot do content conversion using the features provided by File adapter. You will have to have them at the same level of header and then build the logic in your mapping.

Note that the drawback of File adapter is that it cant handle hierarchy.

Former Member
0 Kudos

Hey,

RecordSetStructure= Header, Detaillines,Detaillines2

Header.addHeaderLine = 0 or 1.

Header.fieldFixedLengths= you have 3 fields so give their lengths

Header.fixedLengthTooShortHandling = ignore.

Header.fieldSeparataor = as you wish *Most widely used ( , ).

Header.endSeparataor = 'nl'.

Detaillines.fieldFixedLengths= you have 2 fields so give their lengths

Detaillines.fixedLengthTooShortHandling = ignore.

Detaillines.fieldSeparataor = as you wish *Most widely used ( , ).

Detaillines.endSeparataor = 'nl'.

Detaillines2.fieldFixedLengths= you have 2 fields so give their lengths

Detaillines2.fixedLengthTooShortHandling = ignore.

Detaillines2.fieldSeparataor = as you wish *Most widely used ( , ).

Detaillines2.endSeparataor = 'nl'.

wroks >?

Cheers

<b>*RAJ*

*REWARD POINTS IF FOUND USEFULL*</b>

Former Member
0 Kudos

Hi,

Your FCC parmaters would look like this

Recordset Structure MessageType,Header,Detaillines,Detaillines2

you need to have

addHeaderLine

fieldFixedLengths

endSepartor

This link will also help you. for receiver FCC

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

Regards,

Ramesh P

santhosh_kumarv
Active Contributor
0 Kudos

Hi Manoj

Give the FCC parameter as

RecordSet Structure = Header,,Detaillnes,,Detaillines2,*

Header.endSeparator = 'nl'

Header.fieldFixedLengths = field length

Header.fieldFixedLengthType = char/byte

Header.fieldNames = field1,field2,field3,.....

Header.keyFieldValue = Header

Detaillnes.endSeparator = 'nl'

Detaillnes.fieldFixedLengths = field length

Detaillnes.fieldFixedLengthType = char/byte

Detaillnes.fieldNames = field1,field2,field3,.....

Detaillnes.keyFieldValue = Detaillnes

Detaillines2.endSeparator = 'nl'

Detaillines2.fieldFixedLengths = field length

Detaillines2.fieldFixedLengthType = char/byte

Detaillines2.fieldNames = field1,field2,field3,.....

Detaillines2.keyFieldValue = Detaillines2

The keyFieldValue should be the Value which identifies your record either as Header/Detaillines/Detaillnes2.

Regards

Santhosh

Message was edited by:

Santhosh Kumar V