Skip to Content
Scenario:

This scenario describes the steps involved in configuration of the receiver file adapter with file content conversion.

image
Fig1. File Content Conversion Scenario

Input Message:

This is the input message to the receiver file adapter sent from XI.
image
Fig2. Input XML message

Output Message:

image
Fig3. Output CSV Message

Steps:

       XI sends a XML message as input to the receiver adapter.Now this XML needs to be converted to a File in CSV format, i.e. it may be a comma separated, tab separated etc. To generate the required output, the data type at the receiver’s side plays a crucial rule. The data type should abide to the rules of well formed XML.

The Receiver File Adapter is configured, using the following settings:

  • Choose File Content Conversion as the Message Protocol.
  • You may or may not give the ‘addHeaderLine’ parameter.
  • For the ‘fieldSeparator’ parameter you need to give field separator for both list and substructure (referring to the data type above). For eg: it may be a ‘,’ (comma) for substructure in a comma separated file.
  • The ‘endSeparator’ parameter needs to given for substructure only. For eg: it may be a ‘nl’ (new line)
  • image
    Fig4. Conversion Parameters in Adapter

  • · Give the file name, the directory and the Construction mode. Activate all the settings. Receiver File Adapter with F.C.C. is configured.
Result:

The file with desired output generated.
Recommended Reading:
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

To report this post you need to login first.

16 Comments

You must be Logged on to comment or reply to a post.

      1. Jane Fraga
        Hi Arpit,

        I am also doing the same but in my input file I have 2 rows and using the file content in my receiver I am getting only one row in my target side. Let me know How I have to get multiple row records in to my target file. Let me know the file content information.

        Thanks,
        Jane.

        (0) 
  1. During the migration process problems have been reported for this blog. The blog content may look corrupt due to not supported HTML code on this platform. Please adjust the blog content manually before moving it to an official community.
    (0) 
  2. Tamas Lang
    Hi !

    Do you know how to supress the ‘nl’ endSeparator. I don’t need any endSeparator but it is always there.

    thanks
    Tamas

    (0) 
      1. Tamas Lang
        I know that the default separator is the ‘NL’. In the file there is a 0A Hexa byte according to the ‘NL’. I do not need this 0A byte there. Moreover i do not need any separator between the structures.
        I have set the endSeparator to ”. It does not help. Do you have any other idea ?

        Lang, Tamas

        (0) 
  3. Otto Frost
    Hi,
    I get white space in the file, up to the length of each field, before each separator. How do you get rid of the white space?
    Best regards
    /Otto
    (0) 
  4. Igor Levinskiy
    Hello.
    I have simple structure îf Message –
      
        
          
    …………………..
        

     

    and I want write it in simple txt file.

    I reach a result, but I want form a headerline automatically(according to fields in xml document in Row node)

    something like this:
    field1 field2….
    1      2

    I set

    RecordSet structure = Record,Row

    Row.endSeparator=’nl’
    Record.fieldSeparator=’nl’
    Row.fieldSeparator=’0x09′
    Row.addHeaderLine=1

    when i see a results(at runtime), i can see, that data put into the file correctly, but without headerline(((

    Why????
    help please.

    (0) 
  5. Mohit Verma
    Hi Arpit,
    I am also doing the same.
    I have 3 rows and using the file content in my receiver.
    Thanks for blog,even it is written before so many year still used.

    Thanks,
    Mohit

    (0) 

Leave a Reply