File adapter: End of line issue in unix receiver

Hi all,
We are sending flat files using File Adapter (FTP) with the File content conversion functionality and we can see the file right in our windows system, but when it arrives to the Unix receiver, they give us an error regarding the End of line.
It has a ^M character in every line so it cannot be processed.
Does anyone know how to skip this end of line character in our file keeping the same format?
Thanks in advance.

Hi Daniel,
you can try to use this adapter module:
localejbs/SAP XI Sample/ConvertCRLFfromToLF
http://help.sap.com/saphelp_nw04/helpdata/en/32/43d84072378031e10000000a1550b0/content.htm
Hope this help.
Francesco

Similar Messages

  • SOA Suite 11g File Adapter End Of Line problem

    I am using a file adapter to read(using an NXSD to convert from flat file to XML) a file do some filtering and then write the file in the original format using the same NXSD.
    The records in my file are separated by End Of Line. i.e. each line is one record.
    I created a fixed length NXSD and it picks up '${eol}' as the cellSeparatedBy attribute.
    When I read the file, it reads fine for both Unix(LF) and PC(CR+LF) formats. But when I write it automatically takes unix format most probably because the server is running on a Unix machine.
    Now the problem is that when I receive a flat file in PC format, the output comes as Unix format. The end system can not process it.
    So, I tried using '
' (Equivalent to CR+LF) instead of '${eol}' as the value of attribute cellSeparatedBy. With this it is not able to read the file at all, if I keep it only '
' then it reads. It seems that while reading FIle Adapter automatically converts the file to Unix format first and then reads it with unix EOL.
    As a work around I separated the NXSD for read and write, keep read NXSD with '${eol}' while keeping write NXSD as '
' then my problem is solved but now I have two NXSDs to maintain.
    What I want to know is if there is a way I can use the same NXSD and still be able to write the file in PC format. May be some attribute or switch in NXSD which I dont know of to control the value of ${eol}?

    Hi Daniel,
    you can try to use this adapter module:
    localejbs/SAP XI Sample/ConvertCRLFfromToLF
    http://help.sap.com/saphelp_nw04/helpdata/en/32/43d84072378031e10000000a1550b0/content.htm
    Hope this help.
    Francesco

  • File Adapter OS Command Line After processing (UNIX)

    Hi guys,
    I want to run only one line after message processing:
    compress -f %f
    It must be compress seeing as this is the way we use it on our legacy system where it adds the extension .Z.
    It seems crazy to write a shell script for only one line. Is there any way to run this line without using a shell script and if so should I run it in some additional characters?
    Also if this isn't possible, please show me an example of how the shell script would look like, and where on the XI server this shell script should be saved.
    Thanks a million!
    Anneke

    Hi Anneke,
    Check this blog by Sameer
    /people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi
    Should help u out

  • File adapter OS command line - Calling a command remotely ??

    Hi,
    We have a scenario where in which receiver file adapter after putting a file on the FTP  , a subsequent XML loader needs to be called which would load data into the client legacy ERP system.
    There seems to be some idea about doing it through file adapter OS command line.
    The problem is the how to call this loader command remotely from our file adapter OS command line.
    Any help would be appreciated ???

    >> The problem is the how to call this loader command remotely from our file adapter OS command line.
    The below link might be helpful ...
    http://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature

  • Sender File Adapter Ignore Last Line

    Hi All,
    Like in Sender File Adapter configuration like we have Document Offset to specify the number of starting lines to be ignored,
    Like the same way can we ignore the last line of a text file .
    Regards,
    Rahul

    Rahul,
    ><i>I somehow wait for your answer,</i>
    Is that a compliment
    I guess there is no standard way to ignore the last line . Like you pointed out, read the line and ignore it in the mapping!
    ><i>btw ..
    suppose in a flat file..
    i just want to read the 4th line??
    is there any way i can do this?</i>
    Again no straight forward way to do this. You can use KeyFields etc , but there is no direct way to do this and every solution would depend on the exact requirements!
    Regards
    Bhavesh
    PS Are the alerts issues resolved?

  • File Adapter inserting New Line

    All -
    I'm stuck on this one.  Would anyone know why the File adapter would insert a New Line at the beginning of my file?  The file is output correctly with the exception of a blank line at the very beginning of the file.
    Are there any conversion parameters I need to supply for the receiver file adapter?  I currently have:
    data.endSeparator = 'nl'
    data.fieldFixedLenths = 30,30,15,3
    data.fieldNames = F1,F2,F3,F4
    data.fixedLengthTooShortHandling = Cut
    Thanks,
    Dave

    Ok, found the issue!
    The File Adapter is configured as FTP and when the file is FTP'd to the target directory and viewed using Internet Explorer, a carriage return/line feed is added to the beginnig of the file.  When I FTP the file from the remote directory to my local directory and then view the file, it's fine.  Not sure why Internet Explorer changes the formatting of the file.
    Bottom line - the remote file is fine.
    Cheers,
    Dave

  • FTP receiver adapter - end of line ,marker

    Hi,
    i'm facing a really strange problem. I'm putting a file on  a FTP server from one of our customers. i'm using text conversion with CR* LF** as end of line marker.
    In D and Q where i'm putting the file on our own FTP server everything is ok.
    But in P where i'm putting the file on the customers FTP server they are complaining that their application can not read the file. They sent me a file back (zipped to avoid any translation) and i recognized that this file has CR CR LF as line separator.
    The setup in D,Q and P is exatly the same apart from the ftp server address, userid and passwort.
    How can it come that i'm getting an additional CR and is there any workaround for that?
    CR = carriage return = '0x0d'
    LF = linefeed = '0x0a'

    Hi,
    thx for the answer. I've tested that but i cant see the a difference if i use '0x0d' versus '0x0D'. Both are working on our own FTP server (linux) the same.
    As the productional FTP server is one of out customres and i dont have control over it i guess its a (weired) setup on their configuration.
    I swithched the transfer mode from text to binary to avoid the additional CR (still i dont understand how the ftp server is configured if he is doing that),
    Nevertheless, i'm no havong a file terminated with CR LF.

  • File Adapter vs BPEL interaction issue on high availability environment

    Hi all,
    i would really appreciate your help on a matter i'm facing about a composite (SCA) deployed on a clustered environment configured for high availability. To help you better understand the issue i briefly describe what my composite does. Composite's instances are started by means of an Inbound File Adapter which periodically polls a directory in order to check if any file with a well defined naming convention is available. The adapter is not meant to read the file content but only its properties. Furthermore, the adapter automatically makes a backup copy of the file and doesn't delete the file. Properties read by the adapter are provided to a BPEL process which obtains them using the various "jca.file.xyz" properties (configurable in any BPEL receive activity) and stores them in some of its process variables. How the BPEL process uses these properties is irrilevant to the issue i'd like to pose to your attention.
    The just described interaction between the File Adapter and the BPEL process has always worked in other non-HA environments. The problem i'm facing is that this interaction stops to work when i deploy the composite in a clustered environment configured for high availability: the File Adapter succeeds to read the file but no BPEL process instance gets started and the composite instance gets stuck (that is, it keeps always running until you don't manually abort it!).
    Interesting to say, if I put a Mediator between the File Adapter and the BPEL, the Mediator instance gets started, that is the file's properties read by the adapter are passed to the mediator, but then the composite gets stuck again 'cos even the mediator doesn't seem to be able to initiate the BPEL process instance.
    I think the problem lies in the way i configured either the SOA infrastructure for HA or the File Adapter or BPEL process in my composite. To configure the adapter, i followed the instructions given here:
    http://docs.oracle.com/cd/E14571_01/integration.1111/e10231/adptr_file.htm#BABCBIAH
    but maybe i missed something. Instead, i didn't find anything about BPEL configuration for HA with SOA Suite 11g (all the material i found refers to SOA Suite 10g).
    I've also read in some posts that for using the db as a coordinator between the file adapters deployed on the different nodes of the cluster, the db must be a RAC! Is that true or is possible to use even another type of oracle db?
    Please, let me know if someone of you has already encountered (and solved :)) a problem like this!
    Thanks in advance,
    Bye!

    Hi,
    thanks for your prompt reply. Anyway, i had already read through out that documentation and tried all settings suggested in it without any luck! I'm thinking the problem could be related to the Oracle DB used in the clustered environment, which is not RAC while all documentation i read about high availability configuration always refers to a RAC db. Anyone knows if a RAC Oracle DB is strictly needed for file adapter configuration in HA cluster?
    Thanks, bye!
    Fabio

  • Sender File adapter complex structure FCC issue - flat structure RFC-stuck

    Hi,
    Please help.
    I have a the below file structres-
    Option 1-
    H,100890,P100,A02,S101,AUD#
    I,P,NULL,TH,Test PO TH,1,EA,100,10160000,A002,0001,720090,E.1.4.3,,,,VT#
    I,P,NULL,TH,Test PO TH1 2,2,EA,100,10160000,A002,0001,720090,E.1.4.3,,,,VT#
    H,100899,P100,A02,S101,GBP#
    I,P,NULL,AS,Test PO AS1,1,EA,100,10160000,A002,0001,720090,E.1.4.2,,,,VT#
    I,P,NULL,AS,Test PO AS12,2,EA,100,10160000,A002,0001,720090,E.1.4.2,,,,VT#
    I need to map this into a Z RFC which is expecting all the data in one row - of course multiple rows
    Option 2-
    Same structure as above but all in same row-
    H,100890,P100,A02,S101,AUD,P,NULL,TH,Test PO TH,1,EA,100,10160000,A002,0001,720090,E.1.4.3,,,,VT#
    I,100890,P100,A02,S101,AUD,P,NULL,TH,Test PO TH,1,EA,100,10160000,A002,0001,720090,E.1.4.3,,,,VT#
    I,100890,P100,A02,S101,AUD,P,NULL,TH,Test PO TH1 2,2,EA,100,10160000,A002,0001,720090,E.1.4.3,,,,VT#
    H,100899,P100,A02,S101,GBP,P,NULL,AS,Test PO AS1,1,EA,100,10160000,A002,0001,720090,E.1.4.2,,,,VT#
    I,100899,P100,A02,S101,GBP,P,NULL,AS,Test PO AS1,1,EA,100,10160000,A002,0001,720090,E.1.4.2,,,,VT#
    I,100899,P100,A02,S101,GBP,P,NULL,AS,Test PO AS12,2,EA,100,10160000,A002,0001,720090,E.1.4.2,,,,VT
    This also needs to be mapped into a Z RFC which is expecting all the data in one row - of course multiple rows
    I am getting issues in getting the file data across to Receiver adapter.
    I have tried various combinations but the message is failing in SXMB_MONI.
    How do i do it as i need to get the finalised option for incoming file structure?
    Option 1 is being stressed but how do i map it if i cannot get the receiver structure in RFC.
    Please help as I am stuck now.
    Regards,
    Archana

    Hi,
    The problem is basically in message mapping from file to RFC external message.
    The option 2 is working now and I get correct converted file strcuture after FCC and into RFC and also a correct RFC payload.
    However, business is stressing that can send the file in the format as given in Option 1 where u have different structure - Header and Items. This is not coming out correct in RFC payload as the header has 5 fields as compared to more in item but the header and item are still being mapped to the flat RFC structure and this is creating a mismatch. The item line is missing the 5 fields from Header.
    How do i do the FCC in this situation to get the correct structure in RFC?
    This means that in RFC payload, the first line should be the one as below-
    H,100890,P100,A02,S101,AUD#
    The 2 records after this as received in RFC internal table should be as 2 given below-
    I,P,NULL,TH,Test PO TH,1,EA,100,10160000,A002,0001,720090,E.1.4.3,,,,VT#
    I,P,NULL,TH,Test PO TH1 2,2,EA,100,10160000,A002,0001,720090,E.1.4.3,,,,VT#
    However, the 2 structures contain variable field columns.
    Please help.
    Regards,
    Archana

  • How to know a line of text file is ending with line feed or return?

    hi all, i have a program that read log file that generated by other service (apache http server for example), i want to know that each line is ending with "\r", "\n" or "\r\n" so i can skip them in the next time, like this:
    int char_counter=0;
    BufferedReader reader = new BufferedReader(new FileReader(logFileName));
    while((line=reader.readLine())!=null){
           char_counter+=line.length()+x_value;
    }and the next time read the log file, i will skip all the lines that read in previous time.
    BufferedReader reader = new BufferedReader(new FileReader(logFileName));
    reader.skip(char_counter);
    while((line=reader.readLine())!=null){
           char_counter+=line.length()+x_value;
    }with x_value is 1 or 2 depended on line end with "\n" or "\r\n".
    so, how to know which is the char line ending with?
    Edited by: secmask on Feb 21, 2009 5:46 AM

    Alright, the BufferedReader method readLine() reads all text until it finds a \n character. And then next time you call it it will automatically continue from where it left out.
    try this out it should show it as an example
    import java.io.*;
    public class readLineTest {
        static FileOutputStream filename;
        static BufferedReader input;
        public static void main(String[] args)
            try
                filename = new FileOutputStream("logFile.txt", false);
            catch (IOException e)
                //blank
            PrintStream output = new PrintStream(filename);
            output.println("this is the first line");
            output.println("this is the second line");
            output.println("this is the third line");
            try
                input = new BufferedReader(new FileReader("logFile.txt"));
            catch(IOException e)
                //blank
            for(int i = 0; i < 3; i++)
                try
                    System.out.println(input.readLine());
                catch(IOException e)
                    //blank
    }

  • Problem with receiver file adapter printing data line by line in .txt file

    We are working on e-payments integration with one of the bank. As part of text file generation, we have a written a UDF which accumulates all Invoice details( 10 input fields information ) into one string and then sends output line by line with a delimiter separation for each invoice.
    H
    D
    E
    E
    E
    T
    Bank requires a file in above format separating invoice in separate E band.( one invoice collection in one E band)
    As per our scenario, multiple invoice details from an idoc(PAYEXT) have to be written to a text file line by line.  i.e one invoice details per one row.
    After the execution of the scenario, in SXMB_MONI, the message display clearly showing that the invoice details are printed line by line. A java function used in message mapping for the writing the invoice details line by line.
    But actual file that is written to a text file is showing all the invoice details in written in single row.
    When I enable the option Word wrap in the notepad, then only I can see the details in desired format.
    Please guide us where we are going wrong.
    Can notepad settings make any difference while displaying the text file???
    Is there any way to write the file as desired without enabling the word wrap in notepad.
    Thanks in advance.
    Nagendar

    Hi venkatnrj,
    i hope this UDF might be its helps
    public void CombineText(String[] var1, String[] var2, String[] var3, String[] var4, String[] var5, ResultList result, Container container) throws StreamTransformationException{
    String s = "";
    for( int i = 0 ; i < var1.length ; i++)
         if ( var1<i> != ResultList.CC)
         s = s +  var1<i> + "," + var2<i> + "," + var3<i> + "," + var4<i> + "," + var5<i>  + "\n" ;
    result.addValue( s );
    Output diplay like below the format by using above udf:
    aaa,bbb,cccc,dddd,eee,fff,
    aaa,bbb,cccc,dddd,eee,fff,
    aaa,bbb,cccc,dddd,eee,fff,
    aaa,bbb,cccc,dddd,eee,fff,

  • New line character in File adapter

    I am having a receiver file adapter which generates files with multiple lines.
    My problem is when the target file is opened in notepad there is no line break and the lines comes as continous string with small rectangle as separator.This fails the target upload program.
    When I remove those small squares in notepad and hit enter and then upload it gets uploaded successfully.
    Is there any way to have line break so that new line will be generated each time (the documenation says the by-default it adds new line character then why in notepad it opens like a continous string?)
    Thanks in advance.
    Regards
    Rajeev

    Hello
    I know by default File Adapter value is line break. But if I open that generated file in notepad, the record does'nt appear on the new line. Instead at the end of each line there is special character added at the end of each record. When I hit enter and deletes that special character and then try to load that file it gets loaded successfully.
    So my problem is how to generate the file will give record on the new line. I tried to give 'nl' as endSeparator.
    How to give hexadecimal values? I tried giving '0xHH' but that gives error in File Adapter
    "Error: Conversion initialization failed: Exception: java.lang.NumberFormatException: For input string: "HH"
    Thanks in advance.
    Regards
    Rajeev

  • File adapter and line feeds

    Hi,
    we need to produce a flat file using the content conversion of the file adapter without any line feed (the target structure is a complex one with several record types).
    Example
    What we get now:
    *AAheaderA
    *ABheaderB
    *BAItem1
    *CAsubitem1
    *BAItem2
    What we need:
    AAheaderAABheaderBBAItem1CAsubitem1*BAItem2
    It seems that with NameA.endSeparator parameter you can only add a new character, but I need to delete the line feed.
    Is it possible with standard file adapter or do we need do create our own module with java?
    Thank you.

    Hi Stefano,
    So you Basically want to do content conversion at the receiver end and that is basically to get the entire data in one line.For that please go through these links below.It clearly explains your requirement.
    <a href="/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion Receiver with Content Conversion</a>
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm">Converting File Content in the Receiver Adapter</a>
    carefully make a note of the "The ‘endSeparator’ parameter.
    Regards,
    abhy

  • Flash Pro CS6 BUG - inconsistent end of line for xml files in library saved in xfl - MESSES UP SVN

    When saving in XFL with Flash CS6 on Mac (it also happened in CS5.5), the generated xml files in library often have inconsistend end of line, which blocks SVN commits and I have to manually go in the files and make them consistent.
    The XML nodes themselves all have \r\l as end of line, while, within <[CDATA[]]>, they only have \r.
    We think this happens only when creating new library items on mac, on windows it doesn't happen.
    This slows us down incredibly when working on a team using svn.
    SVN doesn't upload files with inconsistend line ending.
    Line ending shoul be consistent within the same xml file to make svn operations smooth.
    Check an image of the bug:
    http://www.pippoflash.com/_test/flash_bug_eof.png
    you can see clearly the differences.
    thank you
    Filippo

    Thanks Filippo, I could see that now!
    While I was investigating this, I found that this is even happening on a file created and saved on just Windows. I was able to reproduce this using the following steps
    - Create a new AS3 file on Windows
    - Drag out a component to the stage say a Button component from the User Interface section of the Components panel
    - Convert the button component to a Movie Clip Symbol
    - Save the file as XFL and examine the Library XML files (the End of Line is just 'LF' in CDATA section whereas it is 'CR LF' everywhere else)
    Since you were saying 'Items created in windows have no problem', does that means, SVN can commit those without any issues for you? And do you face problem only when the file is Created and Saved on Mac(where the end of line is just LF every where) but Modified and Re-saved on Windows(where the end of line is inconsistent)? 
    Thanks!
    Mohan

  • Sender File adapter Pooling interval & file Size issue

    Hi ALL,
    I have a file size of 400 MB to be picked to be the sender file adapter i am facing issue that the system is unable to even pick the file and place in the Q for Processing.
    1)we have no mapping no content conversion ....only pick the file from one loaction and place it in 3 different locations with 3 different names ...can any one help me in solving this .. ? the best workable method to achive this .
    2) this file is getting created once in a day .say 2 PM .so i can give the poll intravel to 24 hours ..but some times ..the file creation in server gets delayed ..but they cont wain for the next 24 hour to come for processing the file ..so my query is can we reduce  the poll intravel for 2 PM till  3PM hour for some 3 times ..and once it reches 3PM  it can poll as usual with a gap of 24 hour time ..
    thanks
    RK

    Hi Rupash,
    >>I have a file size of 400 MB to be picked to be the sender file adapter i am facing issue that the system is unable to even pick the file and place in the Q for Processing.
    Never use File adapter for picking large file (maximum size which I have seen it to work successfully is 200 MB)
    Instead go for Java proxies. Check this forum post for the discussion:
    Java proxy to use XI as a file mover
    Also if you want some more info on Java proxies refer these blogs and articles:
    /people/prasad.ulagappan2/blog/2005/06/27/asynchronous-inbound-java-proxy
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a068cf2f-0401-0010-2aa9-f5ae4b2096f9
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f272165e-0401-0010-b4a1-e7eb8903501d
    >>this file is getting created once in a day .say 2 PM .so i can give the poll intravel to 24 hours ..but some times ..the file creation in server gets delayed .
    You can do a availability time planning refer these links for more information:
    Planning Availability Times
    http://help.sap.com/saphelp_nw04/helpdata/en/45/06bd029da31122e10000000a11466f/content.htm
    Controlling a Communication Channel Externally Locate the document in its SAP Library structure
    http://help.sap.com/saphelp_nw04/helpdata/en/45/0c86aab4d14dece10000000a11466f/content.htm
    Regards
    Suraj

Maybe you are looking for

  • Lost connection to mobileme galerie

    Today suddenly iphoto lost on one album the connection to mobileme galerie. The content is still on the web, but the ( sync ) folder in iphoto is empty. If i drag a new photo/movie , actually this folder contains movies, to the folder it will upload

  • Labview Installer Problems

    Hi, I have been using Labview 8.2.1 Professional for years developing customer user interfaces. I have started to receive several field incidents of installer failures. Some of the error encountered include: - "Fatal Error!! Required MSI property Per

  • What are the essbase objects?

    What are types of essbase objects available?

  • Can't import old inbox

    I had a computer crash, and had to purchase a new hard drive and re-install the operating system. Fortunately, I had most things back up on an external hard drive. I have imported all my old Mailboxes (for Mail) but cannot for the life of me figure o

  • Error -6753 when rtying to configure Airport Express

    Hi, I've been using my Airport Express for a long time and I was very happy from day one, as I required a device to play my music and print wireless and the Airport Express was the answer. But for the past month I have nothing but trouble with the AE