File receiver- newline character between lines

Hi All,
I am doing a file scenario in which i need to create a file with following structure:
Head1     Head2     Head3
Item11     Item12    Item13
Item21     Item22    Item23
Item31     Item32    Item33
I am able to generate a file which is tab delimited however the very first line of "Item" is not coming on new line. The file that i am getting is as follows:
Head1     Head2     Head3    Item11     Item12    Item13
Item21     Item22    Item23
Item31     Item32    Item33
I need a new line between Header and Item. For rest all items lines I am getting a new line.
In my file receiver adaptor in Content Conversion I have made following settings:
HEADER.fieldSeparator = '0x09'
ITEM.fieldSeparator = '0x09'
I tried with following settings as well but i am not getting newline between Header and Item.
HEADER.endSeparator = 'nl'
ITEM.fieldSeparator = 'nl'
Can anybody plz suggest where i am going wrong? Or is there anything else i should do?
Thanks,
Atul

Hi Nisar,
Thanks for ur reply. I tried with the combination you mentioned but i am not sure why it is not working? Is there any prerequisites for this?
I think 'nl' is default value for endSeparator as even if i removed the two parameters i am getting same output.
Thanks,
Atul

Similar Messages

  • Export to text file shows extra character at line 60, 120 so on

    Hi,
    I am using Crystal report 13 with .net 4.0 ( Visual Studio 2010)
    I have an issue while exporting from CR to Text file,
    After every 60 lines some special character is inserted in the text file. That might be the new page character.
    Is this the limitation of crystal report that the data is not shown is pages?
    If yes, if there any workaround for this?
    Can I set the pagination off for the report- either from .net code OR on the report itself so that I wonu2019t see the unwanted character?

    [CR for VS 2010 .NET SDK developer guide|http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/crnet_dg_2010_en.zip]
    [CR for VS 2010 API reference guide|http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/crnet_api_2010_en.zip]
    See if this helps,
    Bhushan.

  • File format for newline character

    Hi there, I have a scenario to do. From IDOC to flat file. I receive a number of idocs and must convert them into a flat file. Each idoc must start on a new line. Each line represents a new record. I have done this and it works fine. But now the system reading the flat file is having trouble with the newline character. Im using ABAP mapping to create the flat file and the newline characters I tried are
    l_crlf(2) VALUE %_cr_lf
    l_crlf(1) VALUE %_NEWLINE
    Lest say I open the flatfile in MS Word and do a character count it shows as 100 char's but on there system it shows as 101. It has something to do with the file format..
    Does anyone know how to fix this?
    Thanx,
    Jan

    It turnes out that their file encoding was not the same as ours so I just changes the file type brom binary to text and set the encoding to UTF-8
    Thanx,
    Jan

  • How to escape newline character(nl) in file content conversion parameter?

    Hi Experts,
    How to escape newline character(nl) in file content conversion parameter?
    For example:
    field1field2field3
    field4field5field6
    Means Item is splitted in two lines.
    I want to SKIP new line character
    and to collect all SIX fields.
    What will be the file content conversion parameter?
    Thanks in Advance..........

    Hi,
    as far as i know there is nothing in the standard. But the question is why dont you combine at mapping the fields into only structure?
    Regards,
    Udo

  • NewLine Character in the String received from Interactive Adobe Form

    Hello Experts,
    Following is the issue we have with interactive Adobe Form
    We have a text area within the form. User enters the text in multiple lines in this text area.
    We are calling a backend function module designed in SE37 that accepts and process the data from the adobe form.  We are also processing the string data user enters in the text area.
    When we receive the string from the form, the newline character within the string is displayed as '#' in the debugger. We tried splitting this string using cl_abap_char_utilities=>newline and cl_abap_char_utilities=>cr_lf  but NO luck. Though in the debugger we see cl_abap_char_utilities=>newline  as '#'  in the debugger and also '#' is present within the string, for some reason when string is processed to find cl_abap_char_utilities=>newline, we can find/locate it.
    Because ABAP code is not able to identify the newline character within the string received from Adobe form, we are not able to maintain the formatting of the string as it was entered in the form.
    Any help to resolve this issue is appreciated.
    Thanks in Advance.
    Regards,
    Bhushan

    Hi Bhushan,
    I was going through your issue, and I feel this is something you can do with scripting. Basically you should read whole string and find the new line character and replace with a space or comma, as per your requirment.
    Do like following:
    In the exit event of the field select java script and write following code:
    var strng = this.rawValue;
    strng.replace(/\n/g, " ");
    above im reaplcing new line with a space.
    I think it should work I have not tested it. Pls update if you test it .
    Regards,
    Ravi.D

  • Newline character in file

    Hi All,
    I am writing my output to a file .....
    I want to write the subsequent outputs to the same file accompanied by newline character...
    How do i do that?

    Use a PrintStream (or its equivalent Writer) and let the println()
    method do its job, i.e. it will print the correct newline combination
    depending on your platform. If you must do it yourself have a look at
    the System.getProperty("line.separator") property.
    kind regards,
    Jos

  • Getting the newLine character when deleting a line...

    I have a JTextArea that has a custom DocumentListener added. What I want is to be notified when the user hits enter for a new line and be notified when the user removes a line. Getting the newLine when the user hits enter is easy enough, however the reverse is not true. Whenever backspace is pressed it gets the same removeLine character, which is not what I want, because a backspace is not a removeLine( or newLine) character. Here is my code so far...
              public void insertUpdate(DocumentEvent e){
                   Document d = e.getDocument();
                   try {
                        String s = d.getText(e.getOffset(), e.getLength());
                        System.out.println("got a line");
                   } catch (BadLocationException e2) {
                        e2.printStackTrace();
              public void removeUpdate(DocumentEvent e){
                   Document d = e.getDocument();
                   try {
                        String s = d.getText(e.getOffset(), e.getLength());
                        if(s.equals("\n"))
                             System.out.println("removed a line");
                   } catch (BadLocationException e2) {
                        e2.printStackTrace();
              };It's in the removeUpdate that my code is flawed. Can anyone stear me in the right direction?

    What for?By definition when you have a problem, you don't know what the problem or solution is. So you post a SSCCE showing what you've attempted so far so that we can see the problem you are describing.
    Since you also don't know how to ask a very clear question. The SSCCE help in describing the problem. Maybe it won't help in this case, but you don't know that before hand. So you get in the habbit of always posting a SSCCE.
    You talk about removing a line, but I don't know what that means. What happens if you data in a text area like:
    123
    456
    789
    To me removing a line means removing "123\n" to that the entire line is removed from the file. Or what happens if you select 3 and 7 with the mouse and then use the "Delete" key? Did you remove 1 line or 2 lines. Are you trying to count the number of "\n" characters that have been removed. Or do you only care about the backspace key because that was a concious decision or did you just not think about all the other possibilities of how text can be removed from a Document?
    So as you can see you question is not a simple and straight forward as you thought. Without a SSCCE to clarify exactly what you are doing we can only provide half an answer.
    You can find the answer by reading the Swing tutorial. Maybe the section on Key Bindings, if you just want to know when a certain key was pressed. Or maybe the section on a DocumentFilter if you want to know what text has actually been added or removed from the Document (before it happens).

  • File receive adapter command line error handling

    Hi,
    This is our requirement - After the file receive adapter, we need to run a script. Based on the return code of the script, we need to handle the error handling of the interface (i.e. send an email about the error).
    I have looked at the operating system command line in the file adapter. How does XI handle return codes for the command line? If the command line has a error return code, how to send an email from XI?
    If anyone has ideas on this topic, please respond!!
    thanks,
    lasya

    Hi,
    I don't think so, it is possible directly. You can not get the Response back to XI pipeline from the shell script.
    But you can think, if you are able to call this from Mapping.
    And one more option is using Transport Acknowledgement ( with BPM) if the file is not able to write into the target directory you can raise an alert-
    Blog on this-
    /people/michal.krawczyk2/blog/2006/06/22/xi-playing-with-the-file-adapters-acknowledgments
    Regards,
    moorthy

  • Receiver file Content Conversion with Header line

    Hi,
    Here I am doing receiver file content conversion with header line.
    I am able to get the output file correct, when I open the file in notepad the header line and data appearing in the same line (not accepted).
    But when I tried to open the name file in internet explorer I can see the header line and data in two different lines (accepted).
    What should I do I want to see the same output in the notepad?
    Please help me out.
    Thanks in advance,
    Srikanth.

    You can use NameA.addHeaderLine.
    Specify whether the text file will have a header line with column names. The following values are permitted:
    0 u2013 No header line
    1 u2013 Header line with column names from the XML document
    2 u2013 As for 1, followed by a blank line
    3 u2013 Header line is stored as NameA.headerLine in the configuration and is applied
    4 u2013 As for 3, followed by a blank line
    The below weblinks will help you to know the other paramters.
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
    http://help.sap.com/saphelp_nwpi71/helpdata/en/44/686e687f2a6d12e10000000a1553f6/content.htm

  • Adapter file receiver command line dynamic

    Hi everybody,
    In the adapter file receiver, I'd like to put the command line dynamically depending of informations of the payload of the message.
    Do you have ideas ?
    Thank you in advance for your collaboration.
    Regards

    Eric,
    Why not work with Parameters (adapter Specific)
    Enable Adapter Specific attributes and fill them with data from the Payload. Be aware that this need to be filled via the Dynamic Configuration
    See SAP Help
    Dynamic Conf
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
    Sender File/FTP Adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
    Receiver File/TFP Adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    PS: the option Command line execution can also be filled with parameters. This in order to make dynamic cmd line executions
    Greets and Success

  • File receiver : blank line at end of file

    Dear friends,
    we are using file receiver with file content conversion , tp : FTP
    The file has a flat structure & fixed length (no delimiters) :
    reordset parameters used- fieldFixedLengths
    each record is in a different line, but at the end of the records a blank line is inserted.
    (no endSeparator is used.)
    Can you pls advise hot to get rid of this extra blank line

    Hi Datta,
    I am not sure but you can try with follwing parameters...
    NameA.fixedLengthTooShortHandling Specify how you want the system to respond when column widths in the actual document exceed those defined in NameA.fieldFixedLengths. The following values are permitted: 
    ·        Error
    Error means that processing of the document is terminated.
    ·        Cut
    Cut means that a value is shortened to the maximum permitted length.
    ·        Ignore
    Ignore means that the system applies the value completely, regardless of it being too long. Subsequent columns are moved correspondingly.
    U can use ignore in your case.
    For more info. plz check
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm
    Regards
    Sachin

  • By Java how to delete some lines in a text file containg some character?

    Hello All,
    I am having a text file [Basically It is a Sql File]. its containing some commented lines.
    All i need to do is, By using a java Method I have to delete All the commented lines in That file .....
    For Example if My file is like following.
    /**** Commented By Kannan *********/
    Select * From Employee;
    go
    /******************** Commented by Others ********/
    Select * From DevMembers;
    go
    /*** Ends here **********/
    And the output file would be
    Select * From Employee;
    go
    select * From DevMembers;
    go
    can Anyone Help me in this regards,
    Akram Kannan

    BufferedReader should probably wrap the FileReader if you will be reading line-by-line. Same with the Writer.
    And a simple -
    if (  "/*".equals(record.substring(0,1) ) ... should handle the comment locations bit.
    Message was edited by:
    abillconsl

  • How to remove the newline character at the start in the attachment ?

    Hi All,
    I have been trying to attach a .dat file generated at an external source and send it as an attachment by mail using UTL_SMTP, all things are working but the .dat file which comes attached in mail contains a newline character i.e. chr(10) at the start line and the contents of the file are written from second line onwards. Below is some part of the code which deals with read/write of attachment of mail to be sent.
    Can anyone help me on this, is something to be changed in this code??
    UTL_SMTP.write_data(c,
    'Subject' || ': ' || P_SUBJECT || UTL_TCP.crlf);
    UTL_SMTP.write_data(c,
    'MIME-Version: 1.0' || UTL_TCP.crlf || -- Use MIME mail standard
    'Content-Type: multipart/mixed;' || UTL_TCP.crlf ||
    ' boundary="-----SECBOUND"' || UTL_TCP.crlf ||
    UTL_TCP.crlf);
    UTL_SMTP.write_data(c,
    '-------SECBOUND' || UTL_TCP.crlf ||
    'Content-Type: text/plain;' || UTL_TCP.crlf ||
    'Content-Transfer_Encoding: 7bit' || UTL_TCP.crlf ||
    UTL_TCP.crlf);
    UTL_SMTP.write_data(c, UTL_TCP.crlf || l_text);
    UTL_SMTP.write_data(c, UTL_TCP.crlf);
    UTL_SMTP.write_data(c, UTL_TCP.crlf);
    UTL_SMTP.write_data(c,
    '-------SECBOUND' || UTL_TCP.crlf ||
    'Content-Type: text/plain;' || UTL_TCP.crlf ||
    ' name="/inetpub/wwwroot/Novation_Merge/FS_Extract.dat"' ||
    UTL_TCP.crlf ||
    'Content-Transfer_Encoding: 8bit' || UTL_TCP.crlf ||
    'Content-Disposition: attachment;' ||UTL_TCP.crlf || ' filename="' || p_description ||
    TO_CHAR(SYSDATE, 'DD-MON-YYYY') || '.dat"' ||
    UTL_TCP.crlf || UTL_TCP.crlf ||UTL_TCP.crlf);
    BEGIN
    l_filehandle := UTL_FILE.fopen('c:\temp',
    'FS_Extract.dat',
    'r',
    32767);
    LOOP
    UTL_FILE.GET_LINE(l_filehandle, l_buffer, 32767);
    UTL_SMTP.write_data(c, l_buffer || UTL_TCP.crlf);
    END LOOP;
    EXCEPTION
    WHEN OTHERS THEN
    NULL;
    END;
    UTL_FILE.fclose(l_filehandle);
    UTL_SMTP.write_data(c, '-------SECBOUND--');
    UTL_SMTP.close_data(c);
    UTL_SMTP.quit(c);
    EXCEPTION
    WHEN UTL_SMTP.transient_error OR UTL_SMTP.permanent_error THEN
    BEGIN
    UTL_SMTP.quit(c);
    EXCEPTION
    WHEN UTL_SMTP.transient_error OR UTL_SMTP.permanent_error THEN
    NULL;
    -- When the SMTP server is down or unavailable, we don't have
    -- a connection to the server. The quit call will raise an
    -- exception that we can ignore.
    END;
    RAISE_APPLICATION_ERROR(-20000,
    'Failed to send mail due to the following error: ' ||
    SQLERRM);
    END;
    Thanks,
    -Amol

    As I recall, a single blank line serves as separator between Mime Header and Mime Body.
    This code..
    UTL_SMTP.write_data(c,
      '-------SECBOUND' || UTL_TCP.crlf ||
      'Content-Type: text/plain;' || UTL_TCP.crlf ||
      ' name="/inetpub/wwwroot/Novation_Merge/FS_Extract.dat"' ||
      UTL_TCP.crlf ||
      'Content-Transfer_Encoding: 8bit' || UTL_TCP.crlf ||
      'Content-Disposition: attachment;' ||UTL_TCP.crlf || ' filename="' || p_description ||
      TO_CHAR(SYSDATE, 'DD-MON-YYYY') || '.dat"' ||
      UTL_TCP.crlf || UTL_TCP.crlf ||UTL_TCP.crlf);  ..generates 2 blank lines after the Mime Header.
    Remove the last CRLF and see if that does the trick.

  • How to handle a fixed length file without newline?

    Hi Experts,
    I'd like to handle a fixed length file without newline by sender file adapter.
    A file like following.
    It contains three recores."AAXBBBXCCCCX" is one record.
    AA1BBB1CCCC1AA2BBB2CCCC2AA3BBB3CCCC3
    I tried that following two parameters set. But only first recored was read.
    fieldFixedLengths
    fieldFixedLengthType
    Please tell me how to handle.
    Thanks
    Shinya Kawagoe.

    For this case we wrote a simple Adapter Module inserting an end of line character after an offset.
    This way it can be reused in many interfaces.
    And reading the whole file may not be an option in case of large source files. May cause performance / memory issues.
    eolbean.offset = <recordLlen>
    XMLPayload xmlpayload = msg.getDocument();
    byte[] content = xmlpayload.getContent();
    byte crlf = 0x0A;
    int current = 0;
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    int lines = content.length / recordLen;
    do
         lines--;
         baos.write(content, current, recordLen);
         if (lines > 0) // if other lines, eol required
              baos.write(crlf);
              current += recordLen;
    } while (lines > 0);
    xmlpayload.setContent(baos.toByteArray());
    baos.close();
    Audit.addAuditLogEntry(key, AuditLogStatus.SUCCESS,     MODULE + " Done EOLing.");

  • Thin white line between line art and live paint fill?

    I am using live paint to paint cartoon character illustrations.  The artwork is brought into Illustrator CS3 and live traced.  Then I convert it to a live paint group and use the paint bucket to fill.  Everything looks fine no matter how much I zoom in.  If I bring the AI file into Photoshop CS6 I can see a thin white line between the black line art and the fill.  This is most noticeable where black meets black. I can also see this sometimes in file previews while browsing through files.  If the white line cannot be seen in Illustrator is the file ok?  I did just upgrade to CS6 if that would make a difference.
    Thank you for any help.    

    If the white line cannot be seen in Illustrator is the file ok?
    Without knowing specifics,nobody knows.
    "Okay" for what?
    If it looks okay to you in Illustrator, then it's okay for viewing in Illustrator.
    If the export of it does not look okay in Photoshop at 1:1 or higher zoom, then it's probably not okay for whatever you're going to do with that raster image.
    If it's printed to a low-res composite printer, then it may be okay, because the printer may not be able to resolve the whitish pixels.
    If it's printed for commercial (color-separated) reproduction, it may not be okay, depending on the scale at which it will be printed, and on other considerations partially described below.
    The autotrace routine does not build traps. Typically, when you color-fill cartoon line art manually, you don't make the shapes that define the fills merely "kiss" the black line work, as would the default treatments of a stupid autotrace. The black line work typically overprints the fills, thereby creating printing traps.
    Suppose a portion of your cartoon is a hand-drawn closed circle. The black line work is irregular; it varies in width, having been drawn with a marker or a brush. The circle is colored in with a medium green. There are no sloppy gaps in the original between the green and the black.
    You scan it and autotrace it. Unless you apply some deliberate care to make it do otherwise, the autotrace is going to create a compound path, filled with black, and with no stroke; and a green simple path which (hopefully) exactly "kisses" (abuts) the black path. Adobe's on-screen antialiasing of the edge where the two colors abut may or may not cause your monitor to display a faint whitish or grayish sliver between the two colors.
    Similarly, Photoshop's rasterization of it, or the rasterization of a raster export filter may do the same, and may actually result in some off-color pixels along the edge. (Your description of the scenario kinda raises the question of why you are auto-tracing something that you're then just going to rasterize in Photoshop anyway. Why do that? Why not just work with the scan in Photoshop?.)
    So let's leave Photoshop out of the picture and assume you are autotracing it because you want vector artwork. You zoom way in to see if the whitish sliver enlarges. It doesn't, so you assume it's just an aberation of Illustrator's on-screen antialising. And then someone tells you you're in the clear. But are you? Not so fast.
    Let's assume the artwork is destined for commercial (color-separated) printing. Further assume the color of the autotraced black is 100% K, and the color of the autotraced green is 100Y 50C. Three inks involved. None of those three inks are shared between the two objects. So even if the paths do, in fact, perfectly abut, there is no "wiggle room" built in for the minor alignment shifts that almost aways do occur on press.
    Bottom line: Even if you do determine that the common antialiasing aberations that frequently occur on-screen in Adobe apps is just that—just an onscreen aberation, that does not necessarily mean your file is suitable for commercial color-separated reproduction.
    First, you need to understand that autotracing is not the one-click, instant "conversion" of a raster image to vector artwork that far too many think it to be. Just like everything else, you don't just launch a program like Illustrator, start autotracing things willy-nilly without understanding what's really going on. Just like anyting else, you can use an autotrace feature intelligently or...well...not.
    You have options. Illustrator provides an auto-trapping feature. Read up on it in the documentation so you understand what it's all about. Alternatively, you can expand the results of your autotrace, select all the black linework and apply a composite color that includes 100% K and reasonable percentages of C, M, and Y (a so-called "rich black"). Or,depending on the artwork and the desired results, you may consider doing the autotrace as centerlines so you have stroked paths, not just filled paths for the linework. That way, using the flood fill (so called LivePaint) will cause the auto-created fill objects to extend to the paths, not just to the edges of their strokes. Then set the linework to overprint.
    At any rate, if you are doing this professionally, you need to read up on the principles and practices of trapping and color separation.
    JET

Maybe you are looking for