Replacing comma with space

Hi,
Note : I am using SAP 4.6
Task      : Replace Comma with space
Problem : Not able to replace comma with space
I have task where I have to write result file to application server, when I am writing string to application server it is separating by comma, for example if you take below statement it is dividing by space that means in first column PO and then ITEM etcu2026.
MOVE  'PO ITEM is not there in table EKPO' TO W_RECORD_OUT-ERROR_MSG.
so to resolve this situation I have used below code for now, I know I can use
REPLACE ... ALL ENTRIES but this statement is not working in SAP 4.6
REPLACE ',' WITH ' ' INTO W_RECORD_OUT-ERROR_MSG.
  CONDENSE W_RECORD_OUT-ERROR_MSG.
  REPLACE ',' WITH ' ' INTO W_RECORD_OUT-ERROR_MSG.
  CONDENSE W_RECORD_OUT-ERROR_MSG.
  REPLACE ',' WITH ' ' INTO W_RECORD_OUT-ERROR_MSG.
  CONDENSE W_RECORD_OUT-ERROR_MSG.
  REPLACE ',' WITH ' ' INTO W_RECORD_OUT-ERROR_MSG.
  CONDENSE W_RECORD_OUT-ERROR_MSG.
  REPLACE ',' WITH ' ' INTO W_RECORD_OUT-ERROR_MSG.
  CONDENSE W_RECORD_OUT-ERROR_MSG.
  REPLACE ',' WITH ' ' INTO W_RECORD_OUT-ERROR_MSG.
  CONDENSE W_RECORD_OUT-ERROR_MSG.
  REPLACE ',' WITH ' ' INTO W_RECORD_OUT-ERROR_MSG.
  CONDENSE W_RECORD_OUT-ERROR_MSG.
  REPLACE ',' WITH ' ' INTO W_RECORD_OUT-ERROR_MSG.
  CONDENSE W_RECORD_OUT-ERROR_MSG.
  REPLACE ',' WITH ' ' INTO W_RECORD_OUT-ERROR_MSG.
  CONDENSE W_RECORD_OUT-ERROR_MSG.
  REPLACE ',' WITH ' ' INTO W_RECORD_OUT-ERROR_MSG.
  CONDENSE W_RECORD_OUT-ERROR_MSG.
  REPLACE ',' WITH ' ' INTO W_RECORD_OUT-ERROR_MSG.
  CONDENSE W_RECORD_OUT-ERROR_MSG.
appreciate if somebody can help me.
Thanks
sarath

Hi,
Please check the below code.
REPORT  YSAT_TEST.
Data: Var1(40) type c value 'Test1,Test2,Test3,Test4'.
break-point.
REPLACE ',' WITH space INTO Var1.                   " It will replace only first occurrence
replace all occurrences of ',' in var1 with '   '.
CONDENSE Var1 no-gaps.
write: var1.

Similar Messages

  • Repalce comma with Space in Webi report.

    Hi Experts,
    My address Column in Webi report is showing data is like :
    Address (this is the field coming for BW)
    House No1,Flat J10,New Delhi,INDIA.
    Can we replace Comma with the space so that the ablove data would be like :
    House No1 Flat J10 New Delhi INDIA.
    Thanks.

    Hi Abdi
    Use the formula
    = Replace("House No1,Flat J10,New Delhi,INDIA";",";" ")
    then you will get
    House No1 Flat J10 New Delhi INDIA.
    Use the object in place of Text
    =Replace([Address];",";" ")
    Regards,
    Mahi

  • Preventing Discoverer Admin replacing underscores with spaces on refresh

    Hello,
    On refreshing a Business Area, Discoverer Administrator will automatically replace underscores with spaces for any new items/folders to be incorporated. I would prefer this not to happen i.e. the names should retain the underscores. I haven't found any way to do this from within Discoverer Admin - are there some registry settings that I can tweak or is it just not possible,
    Thanks in anticipation,
    Kevin.

    Hi,
    Well, you could try using a eul_trigger$refresh_new_column trigger. I must admit I have never tried this, but the details are in the documentation (http://download.oracle.com/docs/html/B13916_04/appendix_b.htm#sthref2417).
    Rod West

  • Hi, Im using apple 5s with gold color , I want  to replace it with space grey  color .Is it possible in apple store?

    Hi, Im using apple 5s with gold color , I want to replace it with space grey color .Is it possible in apple store?

    If you are within the return period policy of the retail where you purchased the
    iPhone, return it and buy a new one. If outside the return period, sell the current
    iPhone privately and use the money received toward a new iPhone. Or buy a
    case in your preferred color for your current iPhone.
    If purchased from Apple US, return period is 14 days. I believe it is the same elsewhere,
    but check with your local Apple store. Be advised, that even if you are within the return
    period, returns are accepted only in the country of original purchase (EU is one country
    for this purpose).

  • Replacing comma with Javascript

    Hi,
    How to replace commas in an array with Javascript???
    For eg, i have an array that contain the values 1,2,3,4.
    Here i want to remove the comma. So the solution i am looking for is
    1234.
    How to do this. Can we the Java functions like replace() in javascript?
    How to import the Java classes in Javascript???
    Please do provide a solution for this.
    Regards,
    M.Ananthu

    I'm not aware of any mechanism in Javascript that can help with this. In our fully-internationalized web applicaiton we choose to perform all locale-dependent validation server-side. This includes dates, numbers, currency values etc. About the only thing we check in Javscript is that required fields are filled in.
    I'd be interested in knowing if anyone has solved this in Javscript. Its possible that you could dynamically generate a Javscript validation routine based on the locale-specific formatting symbols, but we decided it wasn't worth it.
    T

  • How to replace apostrophe with space

    Hi Experts,
    I need to replace the Apostrophe in Material description with space. I am getting a error as the text literal .....longer than 255.
    highly appreciated for immediate response.
    REPLACE ALL OCCURRENCES OF ''' IN WA_MAKTX WITH ''.
    thanks,
    RRR

    Hi Rammi,
    Hi have tried with the below code and I am getting the proper output as well.
    DATA wa_maktx(10) TYPE c.
    wa_maktx = 'as"dfg'.
    REPLACE ALL OCCURRENCES OF '"' IN WA_MAKTX WITH SPACE.
    write:/2 wa_maktx.
    output:
      asdfg
    Regards,
    Md Ziauddin.

  • Replace comma with dot

    Dear all,
    I'm getteing mad with the following issue and need your help.
    I'm working at a PDF-Form including a table. The Values in this table create a datamatrix. This works fine for now.
    Here is my issue: The values in the table are numbers like 12.2 but also 12 or 9 but maximum two digits in front of the "."(dot). Seperation character should be a "." In Germany there is the ","(comma) instead of the "." at the number block.
    For better usability it would be nice having a java script that replaces onBlur all "," with a ".". So I don't have to change the keyboard language to English.
    Is this possible and if yes, how?
    I am an absolutely noob on javascript, so please be patient and do not expect any specific knowledge.
    What I tried (menue is translatet from the German version, I don't know if it is correct:
    onBlur.replace(",", ".");
    I put this in (right click on form) -> properties ->action ->
    add action: on mouse exit
    choose action: run JavaScript
    click on "add"
    Then I copied the terminus from the top in the opening window. Ready (at least this was my thought...)
    It dit not work, now I nedd your help.
    Thank you for your hints, your help and your time.
    Adobe Acrobat XI (German) on Windows 7 64bit (also german).

    ***************SOLVED**********************
    The solution was much easier than expected:
    when you open "properties" by right clicking on the form, go to "validation" NOT "action" (make sure you are in the form editing mode: "tools" -> "forms" -> "edit")
    then chose "run user defined script" and click on "edit"
    type in the following line:
    event.value = event.value.replace(/\,/g, ".");
    click "OK" and then "Close"
    Then you are done. Now, when you leave the form field Acrobat checks if there is a comma and replaces it with a dot.
    For me this was the easiest way to make it work.
    ***************SOLVED**********************
    ***************GELÖST**********************
    Die Lösung war einfacher als gedacht.
    Öffnet man "Eigenschaften" mit einem Rechtsklick auf das Formular, muss man "Validierung" und nicht "Aktionen" auswählen. (man muss im Formulareditierungsmodus sein: "Werkzeuge" -> "Formulare" -> "Bearbeiten")
    dann unter "Benutzerdefiniertes Validierungsskript ausführen" auf "Berabeiten" klicken.
    Im Editorfenster folgende Zeile eingeben:
    event.value = event.value.replace(/\,/g, ".");
    Über "OK" und "Schließen" zurück zu den Eigenschaften
    Das war's. Nun ersetzt Acrobat im Formularfeld jedes Komma durch einen Punkt.
    ***************GELÖST**********************

  • Replace comma  with a character only if it is enclosed in single quotes

    I have a string
    String stmt = "insert into ABC values (Default,'ABC','1234,xyz,abc');{code}
    expected the result is
    insert into ABC values (Default,'ABC','1234~xyz~abc')
    I want to replace only those commas with a ~ if they are part of the string enclosed in a pair of singe quotes.
    i am trying something like
    {code}String regex = "\'\\w+(,)+\\w*,*\\w*\'+\1";
    String output = stmt.replaceAll(regex,"~");
    {code}
    but its not working
    Please help.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    LearningMachine wrote:
    No, that's not what I am trying to do.
    This is not an insert into a sql, I have to parse a DML (SQL Script) and get table name, values out of it, but I can't split the string with commas.
    Then you should find or build a parser.
    Unless the DML is very well constrained or the set is very small and will remain so, by the time you finish mucking around with all the possibilities attempting it with regexes you will have a parser but not a very good one.

  • Replace comma with nothing

    Hi all
    In a select statement I need to delete the commnas in a string that has a number with commas.
    i.e replace 1,123.10 by 1123.10

    select replace(col,',') from table

  • SFP Replacing 0 with Spaces

    Hi,
    I have  fields in a table in a form created using SFP. When these fields have 0 or 0.0 I  do not want to print any values, I just want a space to print.  I've tried numerous attempts using PATTERN without any success.  The fields in the interface defines these fields numeric and/or decimal.
    Any help would be appreciated.
    Helen

    Hi,
    Take a variable of type c  with length same as your original variable (If original variable have 10 charactes and two decimal with sign then declare new vriable text_new of type char13).
    Note : this TEXT_NEW should be declared in global definition of smartform type char13.
    Now take a program logic just befor this text being printed and assign value to this new variable and in program logic write a condition
    clear text_new.
    text_new = original_value   " assigned original value
    if text_new is initial.
    text_new = space.
    endif.
    Now print this new variable.
    It should definitly resolve your issue.
    Please try and confirm.
    Regards,
    Umang Mehta

  • Replacing Text with Spaces

    What is the fewest lines of code needed to transform:
    'this is a test--have a look'
    with
    'this is a test'
    the idea is to find the '--' in the string and blank out everything after that.
        Thank-You

    >
    Tom Matys wrote:
    > Rob, I try to use this forum quite seriously. If my question was incomplete you can let me know.
    >
    > Otherwise, I suggest you read "The Rules of Engagement"
    >
    > Step 5: Answering a question
    > The community lives by people like you, trying to help others. When you see an unanswered question where you think you can answer, do so and help the poster. Remember to be polite and if you do not completely understand a question and need more details, request more information from the poster.
    >
    >                   Thank-You.
    Good point - let me explain
    I don't think the rules of engagement say this, (at least I don't see it) but if you expect a good answer, you have to ask a good question. I think that if you check, you'll see that my answer completely and correctly answers the question that you actually asked. (I tested it.)
    But to be fair, my answer was meant to ask to think about what you are asking and why you are asking such a question. Is your server so limited in storage space that you have to be concerned about the physical size of programs. Or is the question meant to be performance related? Or something else entirely?
    But also to be fair, you have asked almost 500 questions and seem to be asking the forum a question that you really ought to think about yourself. Those rules of engagement also talk about searching for a solution before asking and explaining what you have done to find a solution in your question.
    Rob

  • How replace comma with break line

    Hi, 
    Instead of John,Dee, i want it to show
    John
    Dee.
    my code isn't do what i want, can anyone help pls?
    thanks
    <cfset mystring ="John,Dee" />
    <cfset TheText = replace(mystring, ',', "#chr(10)##chr(13)#", "ALL") />
    <cfoutput>
    #TheText#
    </cfoutput>

    Yeah.  If you're gonna go ACTUAL HTML output, then forget the line break and just put each indexed value into a <p> tag (which, because it's a block-level element, will place it on each line)
    <cfset myList = 'Aegis,Kleais' />
    <cfoutput>
    <cfloop list="#myList#" index="i">
         <p>#i#</p> 
    </cfloop>
    </cfoutput>
    This should output:
    Aegis
    Kleais
    The spacing between the text can be controlled via CSS.

  • How to replace a rowman letter a filed with space

    Hi All,
    please let me know. how can i repalce a rowman letter in a field.
    In one of the HR field  ( for job descriptiuon ) i have to replace the rowman letter with space.
    example:  Sr Develoiper I.   i have to replace I with  space.
    Regards,
    kishan

    Try with this,
    *-reverse string
        CALL FUNCTION 'STRING_REVERSE'
          EXPORTING
            string  = maktx
            lang    = 'E'
          IMPORTING
            rstring = temp_str.
    But I have a doubt, for Roman char, which are anywhere in String, this will work.
    If you have limited Numbers - like may be I, II, III or may be upto X.
    Write REPLACE statement no. of times.  (Generally not suggested, but for Roman letter fetch I don't find other option)
    REPLACE ALL OCCURRENCES OF 'I' IN maktx WITH ' '
                 REPLACEMENT COUNT cnt .
      IF cnt > 0.

  • Hi expert. replace . with space

    HI expert.
    I want to replace '.' with space . so I proceed below.
    itab is composed to two feilds.
    date1 type char10
    date2 type char10
    the field's values are '2011.01.01'.
    REPLACE ALL OCCURRENCES OF REGEX '\b(.)\b'
            IN TABLE ITAB WITH SPACE
            RESPECTING CASE.
    result.
    date1 : '2011010120'
    date2 : '110101'
    but I want the result below.
    date1 : '20110101'
    date2 : '20110101'
    what should i do?
    please help.

    Hi Jake,
    Using convert date to internal as mentioned by Zafar is a good idea, i don't see how this concerns the no of records, do update the post if you have a special requirement/concerns about using that FM.
    Anyways the other way to do it using the offsets,
    data: l_data type char10 value '2011.01.01',
    l_date2 type char10.
    concatenate l_data+0(4)  l_data+5(2) l_data+8(2) into l_date2.
    or
    l_date2+0(4) = l_data+0(4).
    l_date2+8(2) = l_data++5(2).
    l_date2+8(2) = l_data+8(2).
    Regards,
    Chen

  • Replace any special charecter with space

    Hi all,
    I would like to remove any occurence of special charecter that may belong to  specific language(ä)  or (* & %).
    The input may be a  string in  parameter variable or a file input.
    Regards,
    Sourya

    hi,
    constants: con_cr type x value '0D'. or try '0D0A'
    replace con_cr with space into X.
    else
    go through this"http://help.sap.com/abapdocu_70/en/ABAPREPLACE_IN_PATTERN.htm"
    cheers,
    Bhavana
    Edited by: Bhavana Amar on Apr 15, 2010 8:18 AM

Maybe you are looking for

  • Removing first line in text file... Memory and HD concern

    Hello all, I want to remove the first line of a text file. This is easy... One way to do it, is to find the first "end of line" caracter, strip the string and re-write the sting in file with the "strip to sreadsheet" VI. Since the file can be quite l

  • Cannot Connect to other computers on home network

    First let me say I am a new MAC owner. I have only ever used Windows PCs. I just got my Macbook today and installed SL 10.6.2. I can connect successfully to the internet and the networked printer on my home network. I cannot however, see or connect t

  • Found a major bug in AME 6.0.1 - Anyone else experiencing this?

    When exporting media from Premiere 6.0.1 on a Windows 7 64bit machine with an I7 Quad core with Hyperthreading and 16GB of Ram with NVidia Cuda card (Mercury Engine Acceleration enabled) I encounter an issue where AME hangs.  I can export media  fine

  • For some reason I cant sync my ipod!

    i have windows 7 and keep getting an error message that itunes stopped working and it shuts down how can i fix this?

  • How can I determine the WSDL URL for an Enterprise Service defined in ECC

    I have an Enterprise Service that is defined in ECC and I can see the function definition for it via transaction code se80, ABAP Development Workbench.  However when I open up the Service Definition for the Function and click on the WSDL tab the URL