cancel
Showing results for 
Search instead for 
Did you mean: 

Flat File to Flat File

Former Member
0 Kudos

Hi,

I am doing an interface (Flat file to Flat file)

The input file fields are separated by delimiter @!.Which will have multiple records like LEVEL1,LEVEL2,LEVEL3

Input Flat file

Level1@!PoNo@!ShortText@!StDate@!EndDt@!Vendor@!Status

Level2@!PoNo@!L2id@!L2desc@!L2stdt@!L2ensdt@!L2plant@!order

Level3@!PoNo@!L2id@!L3id@!L3stdt@!L3enddt@!order

Level1@!PoNo@!ShortText@!StDate@!EndDt@!Vendor@!Status

Level2@!PoNo@!L2id@!L2desc@!L2stdt@!L2ensdt@!L2plant@!order

Level3@!PoNo@!L2id@!L3id@!L3stdt@!L3enddt@!order

Level1@!PoNo@!ShortText@!StDate@!EndDt@!Vendor@!Status

Level2@!PoNo@!L2id@!L2desc@!L2stdt@!L2ensdt@!L2plant@!order

Level3@!PoNo@!L2id@!L3id@!L3stdt@!L3enddt@!order

-

-

-

Output file

The outfile fields are separated by tab delimiter

<L1> L1Pono L1desc L1stdt L1enddt L1hr L1cost L1vendor L1misc L1status

<L2> L1Pono L2ID L2desc L2stdt L2enddt L2priority L2loc L2plant L2order

<L3> L1Pono L2ID L3ID L3desc L3stdt L3enddt L3work L3emp L3order

The outfile fields are separated by tab delimiter

<L1> L1Pono L1desc L1stdt L1enddt L1hr L1cost L1vendor L1misc L1status

<L2> L1Pono L2ID L2desc L2stdt L2enddt L2priority L2loc L2plant L2order

<L3> L1Pono L2ID L3ID L3desc L3stdt L3enddt L3work L3emp L3order

-

-

-

Do I need to use file content conversion?how do I replace the delimiter?

Can you please tell me how to do this,appreciate you help.Let me know if you need more info.

Points will bw rewarded

Thanks

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi

For your file to file scenario using FCC you have to configure sender and receiver communication channel using file content conversions.

Following are the parameters which are must for simple file structure.

1. Structure Name (MI_structure)

2. Namespace

3. RecordsetName = false.

Parameters

1. <MessageStructure>.fieldNames

2. <MessageStructure>.fieldSeparator (in your case delimiter @! )

3. <MessageStructure>endSeparator

4. ignoreRecordsetName = true (only if your recordset Structure is false)

Mandeep Virk

Former Member
0 Kudos

Hi Guys,

Thanks for all the replies.I have done all necessary things for sender and reciver communication channels.I am pretty sure the sender CC is fine,but I am not sure of the receiver CC.The file is not being picked up at the sender side.In went and saw the adapter monitoring,it shows me the below error

Receiver Adapter v2405 for Party '', Service 'BS_XIX_010':

Configured at 2008-04-21 09:44:11 CDT

History:

- 2008-04-21 09:44:11 CDT: Error: Conversion initialization failed: Exception: java.lang.Exception: Error(s) in XML conversion parameters found:

Parameter '1.fieldFixedLengths' or '1.fieldSeparator' is missing

In the receiver CC I am giving the following details,is there anything I am missing,do I need to check the Advanced mode in the CC and give info there?

LEVEL1.fieldSeparator ,

LEVEL2.fieldSeparator ,

LEVEL3.fieldSeparator ,

LEVEL1.endSeparator 'nl'

LEVEL2.endSeparator 'nl'

LEVEL3.endSeparator 'nl'

Thanks

VijayKonam
Active Contributor
0 Kudos

If the file is not getting picked and error is in sender CC, you have to correct the problem in the sender CC. The error is clearly told by the error message. Check if you have provided the fixed fields or field separator parameter in the sender cc.

VJ

Former Member
0 Kudos

HI

First You have to use content conversion in sender adapter to create XML. then create mapping according to your requiremaent. Then again use the content conversion in the receiver channel to generate the file according to your requirement with the needed delimiter.

for more details kindly follow these links

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

/people/karthiknarayan.kesavan2/blog/2007/08/22/file-content-conversion-for-multi-hierarchical-structure

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

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

/people/rahul.nawale2/blog/2006/07/18/java-mapping-an-alternate-way-of-reading-a-csv-file

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

/people/sukumar.natarajan/blog/2007/06/12/content-conversion-in-sender-file-adapter--2-new-useful-parameters

regards

sandeep

if helpful kindly reward points

Former Member
0 Kudos

Hey

since you are doing flat file to flat file scenario,how does the source and target message structure looks like?if the structure is same(i.e you are using XI only to transfer file)then you can do this without any CSV or message mapping.

thanx

Aamir

Former Member
0 Kudos

Hi Amir,

The structures are not same.Can you suggest me how to proceed.

Satyagadadas
Active Participant
0 Kudos

hi,

you need all the basic steps like design and config steps

for this interface as you need change file content.

Confgire the sender communication channel to convert flat file

to XML file and do the required mapping and convert the out put

XML to tabdelimitar flat file

Former Member
0 Kudos

Hi Guys

Any feedback on how to do this scenario?

Thanks

VijayKonam
Active Contributor
0 Kudos

Hi

Please read through the file sender and receiver adapter documentation. You have to use FCC at both the ends.

VJ

agasthuri_doss
Active Contributor
0 Kudos

Hi,

>The structures are not same

Go ahead for FCC and obtain the Required Target.

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

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

Regards

Agasthuri Doss

Former Member
0 Kudos

Hi,

Use this Sender side Cpntent Conversion

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

Receiver side content conversion

/people/shabarish.vijayakumar/blog/2007/08/03/file-adapter-receiver--are-we-really-sure-about-the-concepts

Regards

Seshagiri

VijayKonam
Active Contributor
0 Kudos

You need to use content conversion to create XML. then map if needed. Then use the content conversion again in the receiver channel to generate the file with the needed delimiter.

VJ

Former Member
0 Kudos

Hi Vijay,

You mean to say I need to use content conversion in sender adapter and also use content conversion in receiver adapter.

Can you plz explain me more clearly.I cant really understand.

Thanks