I have a scenario where i need to convert a FLAT File to XML ...
Since I am using Seeburger Adapter the usage FCC is ruled out.
Is there any inbult Adapter Module available in SAP PI which can be used to convert a Flat file to XML.
The Flat file has many rows... I just want a single record to repeat n times.
Please help me on this.
> The Flat file has many rows... I just want a single record to repeat n times.
Does the above condition needs to be handled in the adapter ?
Anyways, as Rakesh said, writing an adapter module seems to be the only solution.
Sherin Jose P
Edited by: sherinjosep1985 on Apr 26, 2011 5:43 AM
Why don't try with Message Tran Bean
Check this below details out:
1 localejbs/Seeburger/solution/sftp Local Enterprise Bean solutionid
2 localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean mtb
3 localejbs/CallSapAdapter Local Enterprise Bean exit
mtb Transform.Class com.sap.aii.messaging.adapter.Conversion
mtb Transform.ContentType text/xml;charset=utf-8
mtb xml.conversionType SimplePlain2XML
mtb xml.documentName XXX_EXPENSES_mt
mtb xml.fieldContentFormatting trim
mtb xml.fieldNames FIELD1,FIELD2,FIELD3,FIELD4
mtb xml.fieldSeparator '0x09'
mtb xml.processFieldNames fromConfiguration
mtb xml.structureTitle RECORD
SAP provides MessageTransformBean which can convert the data into XML and also viceversa...
all you need to do is to configure this at your sender adapter level before standard modules in case of sender and after standard in case of receiver....
Search sap help for more info on these module parameters...I remember there is a blog on usage of this in SDN..search.
Since I am using Seeburger Adapter the usage FCC is ruled out....
You can use the Seeburger BIC Module to convert Flat File to XML.
You need to create your own Mapping, using Seeburger BIC Mapping Designer (you need to create an Inhouse to XML Mapping).
So the steps would be:
a) Create Mapping in Seeburger BIC Mapping Designer (BIC MD)
b) Deploy Mapping into PI
c) Use Seeburger BIC Module to run the Mapping in your module chain