How to Replace Line feed

Hi All,
        i want to replace a line feed which is shown as ## in debug mode with space..
Though i have tried replacing it by giving hexadecimal value of # but still its not gettign replaced.
So how do i replace these occurences of line feed in the string which i am using..
Regards,
Syed

Hi try this way :
data: value type string....
data: lv_feed type c value CL_ABAP_CHAR_UTILITIES=>CR_LF.
replace all occurrences of lv_feed in value with space.

Similar Messages

  • Replace line feed with perl

    I'm trying to replace 'line feed & space' with a line feed:
    perl -pi -e 's/\n /\n/g' ~/Desktop/scrap
    With no luck. Any help?

    I'm guessing this is related to line endings. If the file has legacy mac line endings it will behave as a single line. Try running the following. If it reports 0, then you'll need to convert the line endings:
    <pre style="border: 1px solid #ddd; padding-left: .75ex; padding-top: .25em; padding-bottom: .25em; margin-top: .5em; margin-bottom: .5em; margin-left: 1ex; max-width: 25ex; overflow: auto; font-size: 10px; font-family: Monaco, 'Courier New', Courier, monospace; color: #444; background: #eee; line-height: normal">wc -l < ~/Desktop/scrap</pre>
    The following will convert old mac line endings (as well as windows) to unix:
    <pre style="border: 1px solid #ddd; padding-left: .75ex; padding-top: .25em; padding-bottom: .25em; margin-top: .5em; margin-bottom: .5em; margin-left: 1ex; max-width: 40ex; overflow: auto; font-size: 10px; font-family: Monaco, 'Courier New', Courier, monospace; color: #444; background: #eee; line-height: normal">perl -pi -e 's/\r\n?/\n/g' ~/Desktop/scrap</pre>

  • Replace Line Feed a field with imported data

    Hi, I’m trying to replace a line feed in a form field where data is imported to the field.
    I can make the replace function work when typing into the field, but I can’t figure out how to make it work on imported data.
    This is the script I use:
    if (xfa.event.newText.match(/[\n]/) )
    xfa.event.change = "LF"
    Regards,
    Kirstine

    Hi,
    So if I am getting you correctly, the imported data has the new lines (\n)?
    You could try the layout:ready event and test against the field's .rawValue. But this is going to be very inefficient.
    Niall

  • How to show line feeds in table cell

    Dear Expert,
    Now we meet one question,we have a long text which include many line feeds,when show it in a cell of one table in smartform.we can only see the line feeds become to  some ##. not do the ENTER or TAB..
        For example, the show like below:
        ABECDEF#MNIOPHN
       not
       ABECDEF
       MNIOPHN
    So, Would you like to tell me how to do?
    Thanks&Regards,
    Kerry

    Hi Kerry,
    You can use the attributes of class: cl_abap_char_utilities
    If it_longtext is the table which contains your longtext data.
    DATA:  c_new value cl_abap_char_utilities=>newline,
                v_ltxt type string.
    loop at it_longtexts into wa_longtexts.
      concatenate v_ltxt wa_longtexts-text_line  into v_ltxt.
    endloop.
    refresh it_longtexts[].
    split v_ltxt at c_new into it_lontexts.
    Regards,
    Swarna Munukoti
    Edited by: Swarna Munukoti on Dec 4, 2009 11:44 AM

  • How to insert line feed in the alert text

    HI,
    I am sending a message from BMP using alert.
    I need to insert a line feed in the error message because the message is a concatenation of multiple error messages.
    Regards
    Vijay.

    You already have the solution. The XML created by EDI disassembler does not have White Space and Indent enabled so what you see is unindented/non-whitepaced XML.
    However if you view it in IE then you will see it indented and properly formatted. I would assume that you want to do something with the disassembled message such as store it or process it as opposed to having someone read it in a browser or notepad++ ?
    because for processing the data whitespace or indentation is not really consequential.
    Regards.

  • Search and Replace String Function replaces line feeds when I only want spaces replaced?

    I need to replace every instance of a space or series of spaces in a multi line string with commas (or tabs) so I can dump it into a spreadsheet.
    I am using the regular expresion [\s]+ and it works but it is also replacing the end of lines (\r\n) too.
    How can I make it replace the spaces but leave teh end of lines intact?
    Solved!
    Go to Solution.
    Attachments:
    replace.vi ‏6 KB

    Right click on the search string and change it to '\' Code Display. Enter the space character (\s) correctly - you've got \\s right now.

  • How to replace Document Feeder Tray on ImageClass D480

    Part of my document feeder tray on my ImageClass D480 snapped off. I need to replace it. So, I ordered the part for less than 20 from Canon. However, I noticed just now there's no simple way to unattach or reattach it. I called Canon tech support and they said they "DON'T" provide any service guide or sheets to help consumers. Rep said the sales clerk should've told me that. She didn't though. Tech support said I should bring part and printer to local service place, which I won't because it won't be free and will be outrageously priced to just attach outer part. Does anyone know how I can do this myself or where I can download service manual? It's crazy! You can buy a new one for $150. They'll charge me at least $75 to look at it. I appreciate anyone's help.
    Thanks,
    Steve

    Hi Lori,
    Thanks so much for replying.  I tried to follow your advice but I might not have followed your steps exactly?  I went to Custom Scan, clicked on Options, selected Show Scanner's Native Interface, cliked OK, and then this is a screenshot of what I'm seeing (nothing that allows me to select feeder tray).  Are you sure it can be done?  Thanks!  Andy

  • Help - how to insert line feed in string

    Hello,
    I have a servlet that reads lines from a database and I must append them to build a document. There is a field for the data nad a field to tell how many lines to skip.
    // from database
    data String 198
    skip one character
    String doc = "";
    This is not working
    doc = doc + data + '\n';
    for (i=1; i < skip; i++) {
    doc = doc + '\n';
    doc ends up with no spaces between lines.
    Can someone help me with this?
    Thanks
    Frank

    not working = doc ends up with no spaces between lines.
    line1
    line2
    line3
    should be
    line1
    line2
    line3
    Thanks
    Frank

  • How to replace line break for comma

    Hi there,
    i have a string which is like
    header1,value1,header2,value2,header3,value3,header4,value4now i have to write the above string to a file which should be like
    file.txt should be
    header1,value1
    header2,value2
    header3,value3
    header4,value4i can write the string to a file easy, but i need to make the every even number , to line break.
    any help
    Thanks
    R

    You may get a better way, but this is how I would do this:
    -- split the string on comma
    -- iterate through the array using a for i+=2 loop and concatenate every pair of strings with comma-space between.
    db
    edit And write the results to a new array of half the length, of course. Then write the new array to the file.
    Edited by: Darryl.Burke

  • Folder action to find and replace text and change line feeds

    I want to use a folder action to find and replace text and change Mac carriage returns to DOS line feeds inside text files.
    The text to be replaced is: "/Users/wim/Music/iTunes/iTunes Music/Music" (without the quotes)
    This text has to be removed (i.e. replaced by an empty string)
    The text occurs many times within each file.
    The files are playlists exported from iTunes in the M3U format (which are text files). They contain Mac carriage returns. These need to be changed to DOS line feeds.
    I have found the following two perl commands to achieve this:
    To find and replace text: perl -pi -w -e 's/THIS/THAT/g;' *.txt
    To change carriage returns to line feeds: perl -i -pe 's/\015/\015\012/g' mac-file
    I know that it's possible to make a folder action with Automator that executes a shell script.
    What I want to do is drop the exported playlists in M3U format in a folder so that the folder action will remove the right text and change the carriage returns.
    My questions are:
    Is it possible to make a folder action that executes command line commands instead of shell scripts?
    What is the correct syntax for the two commands when used in a folder action shell script? Especially, how do I escape the slashes (/) in the string to be removed?
    Thanks for your help

    Ok, I've include an applescript to run a shell command. The applesript command quoted form makes a string that will end up as a single string on the bash command line.  Depending on what you want to do, you may need multiple string on the bash command lines.  I've included some information on folder actions.
    It is easier to diagnose problems with debug information. I suggest adding log statements to your script to see what is going on.  Here is an example.
        Author: rccharles
        For testing, run in the Script Editor.
          1) Click on the Event Log tab to see the output from the log statement
          2) Click on Run
        For running shell commands see:
        http://developer.apple.com/mac/library/technotes/tn2002/tn2065.html
    on run
        -- Write a message into the event log.
        log "  --- Starting on " & ((current date) as string) & " --- "
        --  debug lines
        set desktopPath to (path to desktop) as string
        log "desktopPath = " & desktopPath
        set unixDesktopPath to POSIX path of desktopPath
        log "unixDesktopPath = " & unixDesktopPath
        set quotedUnixDesktopPath to quoted form of unixDesktopPath
        log "quoted form is " & quotedUnixDesktopPath
        try
            set fromUnix to do shell script "ls -l  " & quotedUnixDesktopPath
            display dialog "ls -l of " & quotedUnixDesktopPath & return & fromUnix
        on error errMsg
            log "ls -l error..." & errMsg
        end try
    end run
    How to set up a folder action.
    1) right click on folder. click on Enable folder actions
    2) Place script in
    /Library/Scripts/Folder Actions Scripts
    3) right click on folder. click on attach folder action
    pick your script.
    Create a new folder on the desktop & try.
    You can put multiple folder actions on a folder. There are other ways of doing this.
    Here is my test script:
    on adding folder items to this_folder after receiving dropped_items
        repeat with dropped_item_ref in dropped_items
           display dialog "dropped files is " & dropped_item_ref & " on folder " & this_folder
        end repeat
    end adding folder items to
    How to  make the text into an AppleScript program.
    Start the AppleScript Editor
    /Applications/AppleScript/Script Editor.app
    In Snow Leopard it's at: /Applications/Utilities/AppleScript Editor
    Copy the script text to the Applescript editor.
    Note: The ¬ is typed as option+return.  ption+return is the Applescript line continuation characters.
    You may need to retype these characters.
    Save the text to a file as an script and do not check any of the boxes below.

  • How to find a carriage return and Line feed?

    I need to detect if a crriage retunr and line feed present on each row in my text file before allowing user to upload the text file
    I know how to remove them from each line but what I need is to detect them no removing them from file.
    Our concern is when the a row does not have carriage return and line feed.
    Is there a way to find this using CF? Please help
    thanks

    That is exactly the problem Dave, if some rows do not have line feed, they're not being inserted into DB, it skips other steps and go right to finish. It looks
    like the file is done processing.
    So I need to do early rejection to this kind of file.
    I used cfloop to catch anything else that do not follow the formatting rules.
    Here is what I already done:
    Right after the file got uploaded, I have these codes:   
    <cfloop  index="x" file="#MyFile#" >
      <CFSETMyLine = Replace(x,chr(9),"|", "ALL")>
      I'm using a few functions, such as, Left(), Mid(), Right(), etc to make sure certain rules are followed.
      Up till here, it's done and tested, everything is working.
      The only problem is when 1 or more rows don't end up with line feed and or carriage return.
      I plan to add some codes to check the end of each row for chr(10) since it is looping for every row anyway.
      If detected, process file normally otherwise stop processing.
    </cfloop>
    So this can't be done in CF?

  • How to replace a field's search help of DDIC in FPM feeder class?

    Hi All,
    I want to replace a field's search help in DDIC structure, for an example, in structure HCMT_BSP_PA_XX_R0009, the field BANKL(Bank Keys) has a search help named 'H_BANKL', I want to replace this search help with other one such as 'H_BANKEY' in the FPM feeder class CL_HRESS_PER_DETAIL, I redefined such method:
    method if_fpm_guibb_form~get_definition.
    field-symbols: <fs_field_description> like line of et_field_description.
    call method super->if_fpm_guibb_form~get_definition
    importing
    es_message = es_message
    eo_field_catalog = eo_field_catalog
    et_field_description = et_field_description
    et_action_definition = et_action_definition
    et_special_groups = et_special_groups
    ev_additional_error_info = ev_additional_error_info.
    read table et_field_description assigning <fs_field_description> with key name = 'BANKL'.
    set search help name of field 'bank key'
    if <fs_field_description> is assigned.
    <fs_field_description>-ddic_shlp_name = 'H_BANKEY'
    endif.
    endmethod.
    I test it and found the search help window was replaced indeed, but all the value of import/export parameters in the new search help was lost, it means, the value of import paramer BANKS(Bank country) and the export parameter BANKA(bank name) were lost. Only the value of BANKL itself can be returned by the new search help window. Can you give me some suggestions about how to maintain the link( value exchange) between structure HCMT_BSP_PA_XX_R0009 and dynamically defined search help 'H_BANKEY' in FPM feeder class?
    I tried to use sap memory ID but it doesn't works well.

    This question was answered at [Webdynpro Forum|how to replace a field's search help of DDIC in FPM feeder class?;:
    That is because for the import and export of DDIC Search help values to work in WDA, not in FPM layer.Feeder Class can do nothing about it.

  • Find the LINE FEED and replace it.

    Hi
    I am using ORACLE 11g R2. I am having some text data in a variable as below :-
    Variable = V_TEXT
    V_TEXT :=
    '/u01/oracle/data/file1.txt
    /u01/oracle/data/file2.txt
    /u01/oracle/data/file3.txt'I want to place an '|' (pipe symbol) at the end of each line. So the expected output is as below :-
    '/u01/oracle/data/file1.txt|
    /u01/oracle/data/file2.txt|
    /u01/oracle/data/file3.txt|' I tried with replace() function and replaced return character i.e. CHR(10) with '|' but it gives me an wrong output and also at the end of last line we dont have an return character.
    after searching a lot on internet I found that i can do this with the help of regular expression.
    As far as i have studied : -
    The line feed character is the last character in the line or we can say it is end of line. This character is noted in oracle as 'x0a'
    I want to replace this character in every line and place an '|' symbol.
    can anyone guide me how to do it ??
    Thanks in advance.

    Aha... Now that is a different expected output as in your original post ;-)
    One way of doing it could be something like this:
    declare
      v_text varchar2(32767) := '/u01/oracle/data/file1.txt
    /u01/oracle/data/file2.txt
    /u01/oracle/data/file3.txt';
    begin
      v_text := regexp_replace(
                   regexp_replace(v_text,chr(10)||'\s*'||chr(10),chr(10))
                 ,'$','|',1,0,'m'
      dbms_output.put_line(v_text);
    end;
    /Inner regexp replaces "linefeed followed by zero or more whitespace followed by linefeed" with a single linefeed. So this removes the blank lines.
    Then the outer regexp takes care of the | characters.
    (It might be possible to wrap it up in a single regexp, though I can't think of a way just off hand ;-) )

  • How do we remove Carriage Return (line feed) inserted in FCC files

    Hi Experts,
    The file that we generate has a carriage return at the end.
    Is there any way in which we can remove this carriage return (line feed) from the file?
    The FCC parameters used at our end are as below:
    structure.filedNames:
    structure.fieldFixedLengths:
    structure.fixedLengthTooShortHandling: Cut
    Kindly tell us a solution ASAP.
    Thanks & Regards
    Dhwani

    Dear All,
    Let me elaborate on my query
    Consider that the files output looks like below:
    12  34  45  545 5454 UL
    23  33  43  434 4545 FG
    45  44  44  586 6535 GM
    Now there is an extra line(Carriage Return) getting inserted after the last line 45  44  44  586 6535 GM  which is not required at our end.
    The cursor of the file instead of stopping on the last character M, points to the next line.
    Can you please suggest how to remove this extra line from the files.
    I dont understan how will remove context help in this case.
    Regards
    Dhwani

  • How to insert a carriage return/line feed in a TextEdit without using wrap

    Hi,
    The string that I want to pass to the textedit is
    "Order Notes : bla bla bla
    Shipping notes : bla bla bla"
    The length of Order notes and shipping notes can vary.
    I am using wrapping. But I need to insert a line feed just before Shipping Notes so it comes on a different line inside the textedit box.
    How do I achieve this?
    Thanks in advance,
    Sachin

    Good thinking, Craig
    I didn't think of this large textarea being present there, just waiting for a question like this ...
    To sum it up for the lazy ones (cause looking at the examples is always worth it, so go do as Craig told ya g!):
    CONCATENATE
    `Order Notes : bla bla bla`
    `Shipping notes : bla bla bla`
    INTO text SEPARATED BY cl_abap_char_utilities=>cr_lf.

Maybe you are looking for

  • Replacement iPad with retina display given to me from an Apple store...

    After a restore was done in the store today I later noticed that most of my photo stream pictures won't come up. They don't go as far as thirty days from today either. I really need these to come up on my iPad  from my iPhone 5.  Any suggestions?  Th

  • Web Report not working with parameter form

    Hi, I have a report which has got a parameter form. This report is running fine in client/server environment. But when I deploy the same report on web (CGI) using PARAMFORM=YES, I am getting the parameter form and after pressing the SUBMIT button I a

  • L_TO_CONFIRM differences posted to 999 - can this stock be set as blocked?

    I am using fuction module L_TO_CONFIRM for some RF processing and I have been asked that where the differences are posted to 999, can this stock also be blocked so as to remove it from the view of MRP. I cannot see how I can do this with this functio

  • Automated addition of Chinese Pinyin keyboard options

    I have Windows 7 x64 sp1 machines with both English and Chinese keyboards installed.  The Chinese keyboard is Chinese (Simplified) - US Keyboard and was installed via regkey during the image process, using the input locale code for Chinese Simplified

  • Role display in RRMX

    Hi Experts,   I created a new role in PFCG.When i entered a TCode- RRMX which is for BEX analyser,So i created a report there and tried to save the report in the newly created role but i can't find the role i created in PFCG  in the bex.   When we ty