cancel
Showing results for 
Search instead for 
Did you mean: 

Sender File adapter

former_member182412
Active Contributor
0 Kudos

Hi experts,

I am reading the fixed length file through sender file adapter.

my file is like this.

<TPE><DIR>I<SCR>MILL<DST>SAP<IID>MILL<IDS>GL FROM MILL<DATE>20070301<TIME>0429<SEQ>00<TOF>00#

<DTE>#

<DRC>BLDJ 200702282802BLD1938311689174BNK-JOURNALS000000000000029000D000000000000029000D

<DRC>BLDJ 200702282802BLD1938311689174BNK-JOURNALS000000000000036000D000000000000036000D

1) i need to ignore first two lines?

2) i need xml format like this

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

- <ns:TranslatorMessage_MT xmlns:ns="http://absa.co.za/BA/Test/Translator_TO_BA">

- <FinancialLedgerDocumentMessage>

- <Finance>

<RecType><DRC></RecType>

<GLCorp1>BLD</GLCorp1>

<JournalID>J</JournalID>

<EffectiveDate>200702282802</EffectiveDate>

<GLCorp2>BLD</GLCorp2>

<GLAcc>193831168</GLAcc>

<ProfitCentre>9174</ProfitCentre>

<TextField>BNK-JOURNALS</TextField>

</Finance>

- <Title>

<Amount>000000000000029000</Amount>

<DtCr>D</DtCr>

<Amount>000000000000029000</Amount>

<DtCr>D</DtCr>

</Title>

</FinancialLedgerDocumentMessage>

</ns:TranslatorMessage_MT>

each record two sub structures finance(occurence=1) and title(occurence=2)(2 amounts and 2 dt/cr)

i configured the file like this

recordsetStructure=Finance,1,Item,2

recordsetName=FinancialLedgerDocumentMessage

recordsetNamespace=http://absa.co.za/BA/Test/Translator_TO_BA

recordsetsPerMessage=*

documentName=TranslatorMessage_MT

documentNamespace=http://absa.co.za/BA/Test/Translator_TO_BA

Finance.structureTitle=Finance

Finance.processFieldNames=fromConfiguration

Finance.fieldNames=RecType,GLCorp1,JournalID,EffectiveDate,GLCorp2,GLAcc,ProfitCentre,TextField

Finance.fieldFixedLengths=5,3,5,12,3,9,4,12

Item.processFieldNames=fromConfiguration

Item.structureTitle=Title

Item.fieldNames=Amount,DtCr

Item.fieldFixedLengths=18,1

Title.processFieldNames=fromConfiguration

can anybody please help me how can i get that xml structure.

Answer will be rewarded

Praveen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

In Content Conversion please use the 'DOCUMENT OFFSET' to ignore the number of lines in the document...

Regarding conversion.. please go through beelow links..

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter

/people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter

/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2

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

/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30

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

/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter

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

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

Regards,

SriHari.

Answers (2)

Answers (2)

Former Member
0 Kudos

HI,

In Sender File Adapter , we have the following option two eliminate two lines

Document Offset :

Specify the number of lines that are to be ignored at the beginning of the document. This enables you to skip comment lines or column names during processing. If you do not make an entry, the default value is zero lines

see the link below

http://help.sap.com/saphelp_erp2005vp/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

Your content conversion parameters are correct.

Regards

Chilla..

Former Member
0 Kudos

praveen,

in file adater their option Called documentoffset: 2 inthat enter 2. your problem will be sloved.

if you still have any doubts let mek now.

Regards

Sreeram.G.Reddy