5 Replies Latest reply: May 2, 2011 3:46 PM by Daniel Rexter RSS

Conversion of Flat file to XML

siva krishna
Currently Being Moderated

Hi ,

    

        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.

 

Thanks,

Siva

  • Re: Conversion of Flat file to XML
    Rakesh Sharma
    Currently Being Moderated

    Hi Siva,

     

    I think there is no pre-existing module in PI to convert a flat file structure to XML. You can write your own Adapter module to convert that flat file structure to XML. As u said, ur flat file structure is simple, ur adapter module wil be simple.

     

    Regards,

    Rakesh

  • Re: Conversion of Flat file to XML
    Sherin Jose
    Currently Being Moderated

    >          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.

     

    Regards,

    Sherin Jose P

     

    Edited by: sherinjosep1985 on Apr 26, 2011 5:43 AM

  • Re: Conversion of Flat file to XML
    Pothana Yadav
    Currently Being Moderated

    Why don't try with Message Tran Bean

     

    Check this below details out:

     

    Processing Sequence:

    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

     

    Module Configuration:

    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

     

    Regards

    Pothana

  • Re: Conversion of Flat file to XML
    Rajesh pasupula
    Currently Being Moderated

    Hi,

     

    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.

     

    HTH

    Rajesh

  • Re: Conversion of Flat file to XML
    Daniel Rexter
    Currently Being Moderated

    Hi Siva,

     

    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

     

     

    regards,

    Daniel

Actions