Content Conversion in File Receiver Adapter

Hi,
I am doing a Content Conversion in File Receiver Adapter.
Input to the Adapter is:
<ns1:FileResponse_MT xmlns:ns1="http://www.bpmtest.com/bpm">
     <OrderID>123</OrderID>
     <Quantity>98</Quantity>
    <Price>76.23</Price>
</ns1:FileResponse_MT>
Desired output is:  <b>OrderID# Quantity# Price (123#98#76.23)</b>
I tried to accomplish this with different settings in ‘Recordset Structure’ and ‘Conversion Parameters’ but could not achieve it, every time an empty file is produced.
Would appreciate any help on this.
Best Regards,

Hi,
Enclose your structure with a parent element like this.
<ns1:FileResponse_MT xmlns:ns1="http://www.bpmtest.com/bpm">
<parent>
  <OrderID>123</OrderID>
  <Quantity>98</Quantity>
  <Price>76.23</Price>
</parent>
</ns1:FileResponse_MT>
Then give the parameters, it will work.
parent.fieldSeparator = '#'
parent.endSeparator = 'nl'
Regards,
P.Venkat

Similar Messages

  • Problems with content conversion in File Receiver Adapter

    Hello, everybody.
        I have a RFC-to-File scenario with file content conversion. Everything is working well except that my file is generated with 2 blank lines at the top of it.
        The function module has 3 importing parameters (1 optional) and the file content comes from an internal table.
        Is it caused by the function module parameters? If yes, how can I avoid this, once I really need them? If not, does anyone have any idea?
        Thanks a lot,
        Marcos.

    Hi, Raj.
    Here they are the function module parameters:
    Importing parameters:
             ICARRIER     TYPE     CHAR1
             FPATH     TYPE     IPATH
             IFILE     LIKE     VBAK-BNAME
    Tables
             IYLASDS_RECPT     LIKE     YLASDS_RECPT
    The structure YLASDS_RECPT has only one field with a single line of the file. I am using this field as the <i>Recordset Name</i> inside file adpater parameters.
    There is no mapping between RFC and FTP messages.
    Thanks a lot,
    Marcos.

  • Splitting to new line in file content conversion in File Receiver adapter

    Hi,
    I have a requirement where I have to split the Header and Line item in separate lines. If the Target structure as follows:
    RecordSet>Record>Header-->LineItem.
    If I do Header and LineItem at the same level, I do not have a problem. If I do that I could not able to map from Idoc correctly. Therefore, I have to do LinteItem tag within Header.
    Please thru some Ideas , how we can this.
    Thanks
    Venkat

    Hi,
    In FCC use two time Record.endSeparators
    Like
    Record.endSeparator - 'nl'
    Record.endSeparator - 'nl'
    I think this will solve yr problem.
    Regards
    Vikas

  • Content Conversion Parameter in File Receiver Adapter

    Hi all,
    I have created one File Receiver Adapter with Message Protocol 'File Content Conversion' and with the following configuration:
    Recordset Structure: Message
    Message.fieldFixedLengths: 1000
    My Message Type is:
    LogErro_MT
      Message (Type: String) (Occurrence: 0..Unbounded) (Details: Min,Max Length: 1000)
    But the file created by it has no data inside it. If I change the Message Protocol to 'File', the content of the file is the XML generated by the Outbound Proxy.
    Would someone can help me?
    Thanks in advance
    Leo

    Hi,
    Please create a data type with
    Records
    Message ---0..unbounded
    and hten MT for the same.
    In the receiver file adapter:
    Recordset Structure: Message
    Message.fieldFixedLengths: 1000
    Please check this weblog for the same:
    /people/shabarish.vijayakumar/blog/2006/04/03/xi-in-the-role-of-a-ftp
    IS this what you are trying to do.
    Regards
    Vijaya

  • File Receiver Adapter - Content Conversion

    Dear All,
    We are using <b>DB to file Scenario</b>.We are using File Content conversion to get a File Comma Separated.
    Data is picked up from the DB and our payload before getting in to File adapter is given below.
      <?xml version="1.0" encoding="UTF-8" ?>
         <ns6:AssoInfo_MT xmlns:ns6="urn:NDB2File2DB">
         <AssoInfoList>
          <AssoInfoNode>
           <Name>ABCX</Name>
           <ID>31154</ID>
           <Salary>10000.0</Salary>
          </AssoInfoNode>
         <AssoInfoNode>
           <Name>ASDAS</Name>
           <ID>18978</ID>
           <Salary>10000.0</Salary>
         </AssoInfoNode>
         </AssoInfoList>
      </ns6:AssoInfo_MT>
    In File content conversion we are giving
         <b>AssoInfoNode.addHeaderLine = 0
            AssoInfoNode.fieldSeparator = ,
            AssoInfoNode.endSeparator = 'nl'</b>
    We are getting output as
    <b>ABCX,ASDAS</b>
    But the <b>expected</b> output is
    ABCX,31154,10000.0
    ASDAS,18978,10000.0
    What change we need to do in our File Receiver Adapter configuration.
    Regards,
    Vedavyas

    Hello,
    Test without these 2 options :
         AssoInfoNode.addHeaderLine = 0
         AssoInfoNode.endSeparator = 'nl'
    I think your problem is with the "endSeparator", it is not necessary.
    A new line is created for each new AssoInfoNode automaticaly.
    Regards,
    Chris

  • Blogs for File content conversion in File Adapter

    hi all,
    Can some one give me the links for File Content Conversion for File to File Scenario. please.
    Thanks in advance.

    Hi
    For Sender
    /people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    /people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    SAP Help for sender
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    For Receiver:
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    SAP Help for receiver
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

  • Query regarding file content conversion using file adapter

    Hi All
    I have a question regarding file content conversion in file adapter.
    I have a file coming in the following format.
    AA,111,222,333
    BB,444,555,666
    CC,777,888,999
    My incoming message structure has a hierarchy. The CC record is a structure part of BB record. BB record is a structure part of AA record. It is like this:
    AA,111,222,333
    <<BB,444,555,666>>
    <<<<CC,777,888,999>>>>
    After file content conversion, in the resulted xml, i am getting a flat hierarchy instead of nested hierarchy.
    Is it possible to get a nested hierarchy as a result of file content conversion?
    Please let me know
    Thanks
    Chandra

    Hi Udo
    According to your suggestion, I am trying to use mapping.
    I am getting a flat file and i am reading it.
    This is my source structure:
    AA,11,22,33
    BB,44,55,66
    CC,77,88,99
    This is my required targer structure:
    AA,11,22,33
    <<BB,44,55,66>>
    <<<<CC,77,88,99>>>>
    To explain this, BB record can have multiple records of CC records.
    AA records can have multiple records of BB record.
    I am using removecontext node function.
    CC (Source)  (removecontext)-> CC (target structure)
    But here, when i rightclick on source CC field in the mapping editor, i cannot see any other context except root node. So, how can i proceed here??
    Many Thanks
    Chandra

  • I need this file "How to Use the Content Conversion Module in JMS Adapter"

    Can someone send me this file:
    "How to Use the Content Conversion Module in JMS Adapter"
    I am not able to find it.
    Thanks
    Antonello

    pls refer guide
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-adapters/how%20to%20use%20the%20content%20conversion%20module%20with%20xi%203.0%20j2ee%20jms%20adapter.pdf
    Regards,
    Swetha.

  • Xml file in dynamic file name in file receiver adapter

    Hi,
    I'm doing the dynamic file name in file receiver adapter. I have done as per instructed in /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
    All turned out okay. I have got the file name I require. Except that the file format is XML and I need to suppress the filename node occupied by the dynamic file name.
    The content conversion mentioned in /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12, does not seem to solve my problem. As it is only for file format other than the XML one, because we only do the content conversion if we want to "convert" the format of the content from XML to the other format.
    Does anybody have the solution to my problem? thanks in advance

    Thank you Raj for the direction
    The way to do it is :
    1. In ID, advanced tab, put a check on the adapter-specific message attributes - file name.
    2. Put a "*" on the file name scheme
    3. In IR, create a UDF to set up target file name :
    DynamicConfiguration conf = (DynamicConfiguration) container
    .getTransformationParameters()
    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    // set up file name for receiver adapter
    String SourceFileName = conf.get(key);
    conf.put(key, TargetFileName);
    return " ";
    4. Map the above UDF to the header level of the target structure.
    Regards,
    Idi

  • File Receiver Adapter - writes empty message although ignore flag is set

    Hi,
    i have an file FTP receiver channel configured with content conversion. I also have set the "Empty-Message-Handling" flag to "Ignore", so empty messages with 0 kb are not written to the FTP server.
    My problem is now: empty file are written to FTP server although this flag is set to "Ignore".
    For example: A message with the following content arrives at my receiver adapter:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_ArticleMaster xmlns:ns0="http://ihle.com/tyredating/core"></ns0:MT_ArticleMaster>
    The resulting file has 0kb.
    Does anyone have an idea why empty message are not getting ignored by this setting? Although the flag is set?
    Thanks in advance,
    MS
    System: PI 7.1 SP 7
    Edited by: Manuel Schlestein on May 12, 2009 5:17 PM

    >
    Manuel Schlestein wrote:
    > Hi,
    >
    > i have an file FTP receiver channel configured with content conversion. I also have set the "Empty-Message-Handling" flag to "Ignore", so empty messages with 0 kb are not written to the FTP server.
    >
    > My problem is now: empty file are written to FTP server although this flag is set to "Ignore".
    >
    > For example: A message with the following content arrives at my receiver adapter:
    >
    > <?xml version="1.0" encoding="UTF-8"?>
    > <ns0:MT_ArticleMaster xmlns:ns0="http://ihle.com/tyredating/core"></ns0:MT_ArticleMaster>
    >
    > The resulting file has 0kb.
    >
    > Does anyone have an idea why empty message are not getting ignored by this setting? Although the flag is set?
    >
    > Thanks in advance,
    > MS
    >
    > System: PI 7.1 SP 7
    >
    > Edited by: Manuel Schlestein on May 12, 2009 5:17 PM
    ideally the file adapter will expect a message with no content in it. so i suggest you use a simple java mapping to check if there is any content between the tags, if there is no content then write out an empty string to the outputstream else pass the same inputstream out

  • File Receiver Adapter

    Hi Guys,
    How can i read a text file using the File Receiver Adapter
    Can anybody help me, please?

    > How can i read a text file using the File Receiver Adapter
    For reading a text file you need to use Sender File Adapter. Receiver File adapter is used to write the file at target directory.
    In order to read the file you have to do File Content Conversion (FCC).
    What is the format of your text file. Is it csv or fixed length file.
    For doing the FCC you can get many bolgs on sdn. If you want just search it.
    Regards,
    Sarvesh

  • Variable Substitution File Receiver Adapter

    Hi,
    I am in the process of implementing a scenario involving the conversion of a .jpg file to .bmp. In my scenario, I'd like to the .bmp file name to be dynamically controlled; therefore, I have used the Variable Substitution option in the File Receiver Adapter.
    In both the File Sender & Receiver comm. channels, I have ticked 'Adapter Specific Messsage Attributes' check-box and selected the 'File Name' option.
    The File Receiver comm. channel also has the following:
    File Name Scheme*: %File_Name%.bmp
    Variable Name: File_Name
    Reference: message:FileName
    Having done the above, I am getting the following error message in Comm. Channel Monitoring:
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: Unknown message header category 'FileName' for variable 'File_Name'.: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: Unknown message header category 'FileName' for variable 'File_Name'.
    Would really appreciate your assistance on this.
    Regards,
    Reuben.
    PS: The Sender File Adapter has the

    Hi,
    The full error message is s follows:
    Runtime exception during processing target field mapping /ns0:MaterialBITMAP_In. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._Test_Conversion_ method setfilename$[17092008, osinef, com.sap.aii.mappingtool.tf3.rt.Context@d3b0d3b] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /ns0:MaterialBITMAP_In. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._Test_Conversion_ method setfilename$[17092008, osinef, com.sap.aii.mappingtool.tf3.rt.Context@d3b0d3b] at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:350) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:401) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:312) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:199) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:215) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._Test_Conversion_ method setfilename$[17092008, osinef, com.sap.aii.mappingtool.tf3.rt.Context@d3b0d3b] at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:56) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:294) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:401) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:312) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:199) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:215) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:47) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:294) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:401) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:312) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:199) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:215) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: java.lang.NullPointerException at com.sap.xi.tf._Test_Conversion_.setfilename$(_Test_Conversion_.java:61) ... 24 more RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:MaterialBITMAP_In. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._Test_Conversion_ method setfilename$[17092008, osinef, com.sap.aii.mappingtool.tf3.rt.Context@d3b0d3b]
    11:15:02 End of test
    Reuben.

  • Operating system command in file receiver adapter

    Hi,
    How to use the Run Operating system command after message processing option in the parameters tab of the file receiver adapter.
    I am working on a scenario wherein a batch file needs to be invoked after the file is written on the file system.
    So how do i invoke this batch file from the file reciever adapter ( Run Operating system command after message processing ).

    Hi,
    did you see this page?
    http://help.sap.com/saphelp_nwpi71/helpdata/en/44/556cb799c93677e10000000a114a6b/content.htm
    it shows all you need to know
    Regards,
    Michal KRawczyk

  • File content conversion:move files to a new directory

    hi all,
              I have a file content conversion sender and receiver scenario.Now my doubt is: XI is running on sap27 server.Input file is being created by an ABAP program in r/3 and file being put in sap29 server.
    In source directory if i am giving the sap29 path it is not working.Is there any way that i can write a OS command to move files from 29 to 27 before message processing ??
    Any other option available??
    thanks,
    Nisheeta

    hi,
          Yes the basis people have shared the folder and they have mapped the sap29 folder into sap27 using I:\ drive
    But the files are not getting picked....am i giving the source directory wrong??
    I am giving I:\Folder_Name
    suggestions needed
    thanks,
    Nisheeta

  • Encrypt Data using File Receiver Adapter

    Dear All,
    How to encrypt file content using file receiver adapter?
    Any suggestions would be of great help.
    Thanks and Regards
    Bhasker

    Hi,
    U can also develop custom adapter module code. For more reference plz have a look:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0ac06cf-6ee2-2c10-df98-e17430ca5949?quicklink=index&overridelayout=true
    Re: Encyprtion in XI.
    Thanks
    Amit

Maybe you are looking for