Jan 10, 2012 - This is a basic overview of content conversion using the file adapter. 1) The first data type will hold the outbound file (flat file) once it's been received by PI. Sender communications channel; Sender Agreement; Receiver. Im following a certain procedure in XI,it said that i need to enter the content conversion parameters. Content Conversion. File Content conversion.. And screenshots of File adapter using Content Conversion Parameters. Receiver Communications Channel.
Name Value Header.keyFieldValue H Item.keyFieldValue I Header.fieldFixedLengths 1,3,3 Item.fieldFixedLengths 1,3,3 Header.fieldNames key1,RecordID,PlantName Item.fieldNames key2,MaterialID,Quantity Header.endSeparator 'nl' Item.endSeparator 'nl' ignoreRecordSet true Sender Communication channel FILETOFILERECEIVERCC. Specify the following in the sender cc. Adapter Type: FILE Transport Protocol: FILE SYSTEM(NFS) Message Protocol: File content conversion Adapter Engine: Integration Server Specify the target directory and the file name and file construction mode: add time stamp. Content Conversion Parameters: Record Structure: Header,Item. Name Value Header.beginSeparator Header Item.beginSeparator Item Header.fieldFixedLengths 10 Item.fieldFixedLengths 10 Header.endSeparator 'nl' Item.endSeparator 'nl' Create a new sender agreement and specify the outbound interface, service and sender communication channel.
Create a new Receiver determination and specify the receiver service and interface. Create a new Interface determination and specify the name of the Interface mapping. Create a new Receiver agreement and specify the receiver communication channel. Note: After each step save and activate it. Some time we need to add the text line in the File content conversion. Let's see the sample scenario.
Consider the above txt file is the source file of xi. Now we fill the File content Conversion parameter such as Document name, Namespace, record set Structure, Key field name. Now we need to specify the FCC parameters. HeaderRecord.fieldSeparator:, HeaderRecord.fieldNames: RecordType,SenderId,RecipientId,Dateofpreparation,Timeofpreparation, UniqueReferencenumber,FileType HeaderRecord.keyFieldValue: 'H' HeaderRecord.enclosureSign: ' HeaderRecord.enclosureSignEnd: ' Same like specify the Detail and TrailerRecord fields. Result: If you see the result the text line contains field separator.But the whole line transferred in a single field with the help of enclosureSign,enclosureSignEnd parameter.
![File content conversion in sap pi at receiver gloves File content conversion in sap pi at receiver gloves](/uploads/1/2/5/6/125624859/532991567.jpg)
Hello Binod, I implemented your idea, but output is not coming in correct format, Requirement is: convert the file format in PI/PO from tab separated text file to pipe separated csv file Since, this is pass through, please suggest changes needs to be done in receiver only. Because, sender is already sending flat txt file with Tab separated to some other system. So, i need to configure in only receiver channel. I configured the message transformation bean its converting flat txt file to xml but header filed is also coming in xml, I just confused what to do. Please suggest me what changes need to be done in receiver SFTP channel?
Regards, Binod Kumar. Hi Evgeniy, I didn't get 'You could try to use this type (with the only structure) to remove header row '. Can you please tell me exactly what i have to mention to remove the header filed for Plain2XML conversion? As you suggested to convert, flat.txt file to XML structure, second - to transform it back to.csv structure using pipe separator. Do i have to implement both conversion in SFTP reciver channel only,OR.txt file to XML in Sender and 2nd conversion in receiver? Since, existing sender channel i don't have to touch, it is transferring flat.txt with tab separation file to some other ERP i want to just configure everything in new created receiver SFTP channel. Regards, Binod Kumar.
0. Hello Binod & Evgeniy, Both of your suggestion works fine. Thank you very much.
![Receiver Receiver](http://www.riyaz.net/blog/wp-content/uploads/file-content-conv-receiver.jpg)
With java mapping it's working fine, tested. (as expected, but don't want to include ESR, it's pass through) with message transformation bean it's also works fine now, but little bit of output mismatch. I have attached the complete module configuration details with sample.txt file and output.csv file, that m getting. After every field pipe should be there, but here project name character is getting reduced. Please check it and provide me the suggestion.
I guess it due to xml.fieldFixedLengths value, since 'ProjectName' in sender side is not constant in character wise, some project name is of 20 characters, some of even 80 characters, don't know what to mentioned here. Thanks a lot, Binod.