Receiver File Adapter: Problem with NewLine Content Conversion Parameter

Hello Everybody
On our SAP-XI (SAP NetWeaver 2004s, sp14) I have the scenario to send a price catalogue (IDoc PRICECATALOGUE.PRICECATALOGUE02) from SAP R/3 as csv PRICAT file to a file share.
In the receiver communication channel I have defined
Message Protocol = File Content Conversion
using the following RecordSet:
RecordSet = HeaderRow,MainBody
One header row is followed by one or more main body rows. The csv PRICAT message format demands that there is an empty row (i.e. one carriage return) between header and main body and another carriage return after the last main body row:
<Header Row>
carriage return
<MainBody 1>
<MainBody 2>
carriage return
As content conversion parameters I tried to use NewLine ('nl') to create the carriage returns in the file:
HeaderRow.fieldSeparator = ,
HeaderRow.endSeparator = 'nl'     " new line
MainBody.fieldSeparator = ,
MainBody.endSeparator = 'nl'
Using the settings I have been able to created the carriage return at the end of the file but not the one between header and main body.
As workaround I have used the following approach:
" Add the following XSLT mapping between header and body:
            <SeparatorLine>
                <value>
                    <xsl:value-of select=" '' "/>
                </value>
            </SeparatorLine>
RecordSet and parameters have been changed accordingly:
RecordSet = HeaderRow,SeparatorLine,MainBody
HeaderRow.fieldSeparator = ,
HeaderRow.endSeparator = 'nl'  
SeparatorLine.fieldFixedLength = 0,0   " sic! 
MainBody.fieldSeparator = ,
MainBody.endSeparator = 'nl'
Has anybody an idea why I failed to receive the first carriage return and has somebody a more elegant solution?
Kind Regards
   Uwe

Hi,
Thanks for reply. I have already used 'nl'.
When i open into the notepad it is showing [] boxes rather then new line.
e.g. 1 [] 2 []
but when we open into wordpad it opens properly.
Customer wants when he opens in notepad it should show line by line.
e.g.
1
2
How should i convince to customer ?

Similar Messages

  • Sender file Adapter, problem with proxy authentication

    HI all,
    i'm having some problems with the following scenario, i need to configure a sender file adapter which connects to a FTP server. To connect this FTP server i need to set a proxy (and so a username and a password), and i don't know how to do.
    From note 821267 seems that the proxy is not supported for an FTP adapter, but the are some workaround like the ones described in the following link
    Re: Proxy server inFTP adapter
    http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=57137
    They don't work in my case as i need to se two username (the one for proxy and the one for the ftp server) and i cannot force the proxy use for all XI applications.
    Can anyone help me?
    Thanks a lot
    Aldo

    Proxy is necessary to exit the customer local intranet. It's not possible to go outside network without going through the proxy server.
    I cannot set the proxy server in file adapter as it's not supported like described in SAp note,  a possible workarounf is to force the proxy server in the J2ee stack but in this way all PI calls would use that proxy..

  • Sender File Adapter - Problem with field separator

    Hi,
    I want to upload a CSV file into XI.
    The file contains a text part which uses from time to time quotation marks like this:
    SD,575757,383838,N/A,XYZ,"This is a text part",7676
    But besides there are lines like this:
    SD,575757,777722,N/A,XDE,FREETEXT,7575
    Has anyone any idea how to configure the file adapter to get it recognize the quotation marks not as field separator?
    I've already tried the enclosureSign parameters but that leads to an total unconverted line.
    Is it maybe possible to customize two field separators like this:
    Structure.fieldSeparator - ,"
    Thanks for any answer,
    Christina

    No, it doesn't work.
    I've specified now:
    Structure.fieldSeparator        ,
    Structure.enclosureSign         "
    Structure.enclosureSignEscape   ""
    Every line without quotation marks is converted fine. Lines with quotation marks stay like in the original CSV file and the whole line is put into one XML tag (still comma separated).
    Also the parameter fieldContentFormatting - nothing doesn't make a difference.
    Other ideas?

  • Receiver file adapter problem in file to file scenario

    My situation is: I created the scanrios with file adapters, using
    FTP, the sender adapter is picking up the file, but the output file
    is not been created in the path mentioned, both the adapter status
    looks green,  I have no error message in the sxmb_moni for this
    scenario. my adapter status looks as below:
      kris_scenario1_filetofile_receiverCC Receiver Adapter v2112 for
    Party '', Service 'krishna_bussystem01':
    Configured at 2006-05-28 20:14:19 EDT
    No message processing until now
      kris_scenario1_filetofile_senderCC Sender Adapter v2126 for
    Party '', Service 'krishna_bussystem01':
    Configured at 2006-05-28 20:11:35 EDT
    History:
    - 2006-05-28 20:16:25 EDT: Polling interval started. Length: 10.000 s
    - 2006-05-28 20:16:25 EDT: Processing finished successfully
    - 2006-05-28 20:16:25 EDT: Processing started
    - 2006-05-28 20:16:15 EDT: Polling interval started. Length: 10.000 s
    - 2006-05-28 20:16:15 EDT: Processing finished successfully

    Moorthy,
    as you suggested I checked in MDT, FYI I am doing without content coversion. from the below message I dont see any problem, so what could be a problem
    The sender has 'delivered' status but the receiver has 'to be delivered' status
    <b>Receiver audit log:</b>
    2006-05-29 00:07:56 Success The message was successfully received by the messaging system. Profile: XI URL:
    2006-05-29 00:07:56 Success Using connection AFW. Trying to put the message into the receive queue.
    2006-05-29 00:07:56 Success Message successfully put into the queue.
    <b>Sender audit log:</b>
    2006-05-29 00:07:54 Success Send binary file "filetofile.xml" from FTP server "xx.xx.xxx.xxx:/yyyyy", size 221 bytes with QoS EO
    2006-05-29 00:07:54 Success Application attempting to send an XI message asynchronously using connection AFW.
    2006-05-29 00:07:54 Success Trying to put the message into the send queue.
    2006-05-29 00:07:54 Success Message successfully put into the queue.
    2006-05-29 00:07:54 Success The application sent the message asynchronously using connection AFW. Returning to application.
    2006-05-29 00:07:54 Success The message was successfully retrieved from the send queue.
    2006-05-29 00:07:54 Success File "filetofile.xml" deleted after processing
    2006-05-29 00:07:54 Success The message status set to DLNG.
    2006-05-29 00:07:55 Success The message was successfully transmitted to endpoint http://host:port/sap/xi/engine?type=entry using connection AFW.
    2006-05-29 00:07:55 Success The message status set to DLVD.

  • Receiver File Adapter Problem

    Hello,
    I m message is in "To be Delivered" status
    In the detials i could see following error :
    Admin action: Redelivering the message failed, due to: com.sap.aii.af.ra.ms.api.DuplicateMessageException: Message ID 995b0348-a504-7441-e100-00000a1974ee(INBOUND) already exists in queue: File_http://sap.com/xi/XI/SystemRecv.
    In SMQ1 & SMQ2 nothing is stucked.
    How can i clear AE queue??
    Thanks,
    Maheshwari

    Hi,
    Go though the below link
    I also faced the same problem. In my case some other sceanario CC are in error status and all messages in those CC are structed in message system i.e. in AE . So i rectified all error CCand i resend messages.
    Difference between Business System and Business Service
    If that is not the case then restart ur J2EE engine
    Thanks,
    Venkatesh

  • Error dynamic File Name in Receiver File Adapter

    Hi all,
    Dynamic file name for Receiver file Adapter Problem
    my multi mapping look like this in design mode
    messages
         message1
              SD01_E
                   FileName
                   row
         message2
              SD02_E
                   FileName
                   row
    by processing the xml look like this:
    <ns2:SD01_E xmlns:ns2="urn:lsv.de/SAP/XXX">
    <FileName>L40SA939.xiConstant</FileName>
    - <row>
    or
    <ns2:SD02_E xmlns:ns2="urn:lsv.de/SAP/XXX">
    <FileName>L40SA939.xiConstant</FileName>
    - <row>
    in file receivere adapter  i have try this but it dos not work
    payload:SD01_E,1,FileName,1
    Error:com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 0(:main:, row:1, col:0)
    is there any way to have access to Filename  in different root elements??
    regards
    Ralf

    Hi Ralf,
    i think, you need for each XML msg (each different root element) a new adapter -> a new IF determination, new rec agreement and a new channel.
    Regards,
    Udo

  • Problem with file content conversion in receiver file adapter

    Hi All
    I have a problem with file content conversion in receiver file adapter.
    This is my recordset structure: Header_Record,1,Claim_Record,*,Check_Rec,1
    These are the content conversion parameters:
    Header_Record.fieldSeparator = ,
    Header_Record.endSeparator = 'nl'
    Claim_Record.fieldSeparator = ,
    Claim_Record.endSeparator = 'nl'
    Check_Rec.fieldSeparator = ,
    Check_Rec.endSeparator = 'nl'
    In SXMB_MONI, i can see that the data is correctly extracted from proxy, and correctly mapped to receiver message, and i see a checkered flag (success).
    But, Adapter status is RED with the following error message:
    Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter '1.fieldFixedLengths' or '1.fieldSeparator' is missing
    In communication channel monitoring, i get the following error message:
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Channel has not been correctly initialized and cannot process messages
    What is going wrong here? Can anyone please tell me?
    Thanks
    Chandra

    Posted in Incorrect forum.
    Posted again in Process Integration forum

  • Problem with File Content Conversion (Receiver FIle Adapter)

    Hi Experts,
    I have following structure in receiver side:
    MT_Test
       F1
       F2
       F3
       F4
    Now I want a CSV file in target side in below format:
    F1,F2,F3,F4
    I have provided below config in receiver file adapter under content conversion tab:
    Recordset Structure : MT_Test
    MT_Test.fieldSeperator= ,
    MT_Test.endSeperator= 'nl'
    But this is generating blank CSV files in target directory..What might be the reason.. I have checked the msg in adapter engine, the XML file is correct and contains valid values for the fields..Its something like below:
    <?xml version="1.0" encoding="UTF-8" ?>
    <MT_Test>
       <F1>Hai</F1>
       <F2>Hello</F2>
       <F3>Bye</F3>
       <F4>Hi</F4>
    </MT_Test>
    I should get CSV file as
    Hai,Hello,Bye,Hi
    But I am getting a blank file with above said config parameters in content conversion tab.
    What might be the reason for getting blank CSV files in target side???
    Thanks,
    Adi

    Hi Adi,
    >>My target structure in below format:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <MT_Test>
    <F1>Hai</F1>
    <F2>Hello</F2>
    <F3>Bye</F3>
    <F4>Hi</F4>
    </MT_Test>
    So, try to edit Data type and include hierarchy level above <F1>.
    Finally your Target Structure will resembles like this.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <MT_Test>
    <Structure>
    <F1>Hai</F1>
    <F2>Hello</F2>
    <F3>Bye</F3>
    <F4>Hi</F4>
    </Structure>
    </MT_Test>
    FCC Parameters will be like this.
    Structure.fieldSeparator = ,
    Structure.endSeparator = 'nl'
    Hope you were clear.
    Thanks,
    Siva.

  • Receiver File Adapter Content Conversion Problem.

    Hi All,
    I am getting in receiver file adapter due to content conversion setting. Problem is that all the fields coming in file adapter are optional. In content conversion , i have specified fieldfixedlengths. So whenever any optional field is not present , it fails . How should we handle it? is there any option to declare fields as optional, I know that is the there for sender adapter. But no. of fields is also very large, so putting each and every field as optional is very time consuming.
    What should i do?
    Ranjeet Singh.

    Hi Daniele,
    Instead of using the standard funciton , i created a UDF for handling this situation.
    My logic is UDF is like
       //write your code here
    int Size = Integer.parseInt(Truncate_Size);
    String Return_Value = "";
         if  (!("".equals(Input)) )
              if  (Input.length() > Size )
                   Return_Value = Input.substring(0,Size);
              else
                   Return_Value = Input.substring(0, Input.length());
         else
              for(int i = 0; i< Size ; i++)
              Return_Value = Return_Value + " " ;
    return Return_Value;
    SO in this case also , it should be able to handle empy source element. But it is not working.

  • Receiver File Adapter with File content Conversion

    I have a requirement to send 2 different files to the target directory. Source is the same and different mapping for the 2 files.
    This I can achieve through multi-mapping but there is a problem. How can I use the File content for receiver File adapter which is using Multimapping.
    The structure of the 2 files also different.

    Why would you need FCC on receiver file adapter? If you need different files to be generated from the source, you could create two receiver channels with different mappings and just add them to the same Receiver Detemination. Isn't feasible?

  • Error in Receiver File adapter using File content Conversion

    Hi,
    I am getting the following error in the receiver file adapter.
    Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'statement.fieldFixedLengths' or 'statement.fieldSeparator' is missing
    I am using the below parameters for FCC:
    Recordset Structure - statement
    statement.endSeparator - 'nl'
    statement.fieldSeparator - '0X09'
    statement.fieldNames -xblnr,wrbtr,newbs,kostl,newko,prctr,xref1,rke_wwfud,rke_wwst3,blart,bukrs,bldate,budat,gjahr,monat,ctype,waers,bktxt,posnr,wbs_element,mwxkz,businessplace,businessplace,c_waers,c_wrbtr,g_ctype,g_waers,g_wrbtr,h_ctype,h_waers,h_wrbtr,trade_id,lob,sgtxt,zuonr,reason_rev,ldgrp,tcode,lifnr
    ignoreRecordsetName - true
    Please let me know where i am going wrong.
    Thanks,
    Aparna

    Hi Aparna,
    I feel the problem in your content conversion parameters is with
    statement.fieldNames and ignoreRecordsetName
    When you are confirguring receiver file adapter for file content conversion the above one is not required. Please refer below link for details on configuring content conversion in file adapter
    [http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm]
    Hope this helps !!
    Regards,
    Amit

  • Receiving file adapter content conversion issue

    Guys,
    Could someone please help me with a Receiving file adapter issue?
    My output structure is something like this:
    Vendor_file_MT (occurence 1)
    --Recordset (occurence 0..unbounded)
    Vendor (occurence 1)
    Field1
    Field2
    Field3
    Field73
    Field74
    My content conversion is very simple:
    Recordset Structure: Vendor
    Parameters:
      Vendor.fieldFixedLengths   30,30,30, (...) ,1,27
      Vendor.fixedLengthTooShortHandling   Cut
      Vendor.endSeparator   'nl'
    If I don't do the content conversion, it works fine, I get all the fields in the XML format.
    When I do the content conversion however, I get multiple lines but only the very first field of each line.
    What could be the problem? What am I missing here? Any idea?
    Your help would be much appreciated.
    Thanks,
    Viktor

    Varga:
    Its little strange that its not working even after adding that.  Did you check the receiver channel in your RWB for any logs. Add the statement in my previous post and Also try to clear the Cache and activate the channel again..See if it works
    Glad it worked
    Edited by: Guru on Apr 21, 2008 3:15 PM

  • 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

  • Receiver File Adapter - Content Conversion

    Hi,
    I don't quite get this:
    I have a structure
    <?xml version="1.0" encoding="UTF-8"?>
    <AnElement1>
       <AnElement2>
          Bla bla bla
       </AnElement2>
    </AnElement1>
    I want to convert this to a flat file with a line containing
    Bla bla bla
    In te receiver file adapter I define the following:
    In the 'Content Conversion Parameters'
      Recordset Structure : AnElement2
      Name                         Value
    AnElement2.addHeaderLine         0
    AnElement2.fieldSeparator        'nl'
    AnElement2.endSeparator          'nl'
    This results in an Empty file each time indicating some error somewhere.
    What am I missing?
    Thanks
    Andre

    Hi Andre,
    Just check the link <a href="http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm">File content conversion</a>
    Also check out this web log <a href="/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2 to TXT</a>
    Is there any error log shown in File adapter ?
    Regards,
    Keith
    Message was edited by: keith thompson

  • REG: File content conversion in Receiver file adapter

    HI Gurus,
    I have the scenario like proxy to file with content conversion
    my message type for the source like this
    MT_SOURCE
    -----||
           |---ROW
    ------------||
                    |---LINE
    target strucuture also same
    MT_TARGET
    -----||
           |---ROW
    ------------||
                    |---LINE
    i am using the following FCC parameters in receiver file adapter
    LINE.fieldSeparator = '                       '
    LINE.fixedLineWidth = 90
    LINE.lineSeparator  = 'nl'
    LINE.fieldFixedLengths = 200
    LINE.endSeparator        = 'nl'
    the output file show the data differently in note pad when compare to word
    word output
    dgepvs                       023456987
    kgdd0016155710                SS Smw Ne 01                                                                               
    kgdd0016155710                SS Smw Ne 01                                                                               
    kgdd0016155710                SS Smw Ne 01                                                                               
    kgdd0016155710                SS Smw Ne 01                                                                               
    kgdd0016155710                SS Smw Ne 01                                                                               
    kgdd0016155710                SS Smw Ne 01                                                                               
    kgdd0016155710                SS Smw Ne 01
    notepad out put
    dgepvs           023456987   kgdd0016155710                SS Smw Ne 01       kgdd0016155710                SS Smw Ne 01          kgdd0016155710                SS Smw Ne 01            kgdd0016155710                SS Smw Ne 01    kgdd0016155710                SS Smw Ne 01
    word output is the correct output wat i am expect but same out put i want in note pad can any help me out for this how can i resolve this
    Thanks in advance

    There is nothing wrong in your content conversion parameters. This is pure editors interpretation for the next line character.
    I would do in java program to fix this issue using '\r\n'   You might want to try and see how that helps for notepad editor.

Maybe you are looking for

  • How Can I print my report through character mode using DOS, very very urgent

    Hi all I would like to print my reports instead of from windows based, I want to print through DOS mode. While giving dos mode printouts report builder is hanging and comming out. Any help will be appreciated. Thanks Reddy

  • Adobe Acrobat 9 Pro: Printing Preferences display issue

    Hi everyone, A user reported an issue with the PDF Printer Preferences drop-down menus running outside the window and that there should be more checkboxes below the three that are showing (see screenshots). Here is a screenshot of this same window on

  • Adding  a parameter in /SAPAPO/CIF_DELTA3

    I have a requirement for adding a new parameter for for the method RELEVANT_FOR_COMPARE_R3_STOCK .  This method is coming under class /SAPAPO/IF_EX_CIF_DELTA3 . This class is coming under /SAPAPO/CIF_DELTA3 .  when I went to method RELEVENT_FOR_COMPA

  • Passing date value

    Dear all, using java improter i had imported one in oracle forms. in program unit i found this procedure which i need to call PROCEDURE setStartDate( obj ORA_JAVA.JOBJECT, a0 ORA_JAVA.JOBJECT) IS BEGIN args := JNI.CREATE_ARG_LIST(1); JNI.ADD_OBJECT_A

  • Smartform - remove second page

    Hi all, I need to print a smartform having multiple pages based on the data.I am creating two pages in the smartform.the first page containes a main window  and several secondary windows and the second page also contains several secondary window and