Formatting--Replacing 0.00 with SPACES??

Hi Experts,
my_Discount LIKE BSEG-KBETR (CURR field i.e. DEC field).
Am doing grand totals of my_classical report, which contains some amounts and Discount% (but, am not doing Total of Discount%).
But, am getting 0.00 under the column of Disc% in Grand total row!
So, I dont wanna even to display the 0.00 numbers, instead I wanna show SPACE, in the said column!
So, Is it possible?
thanq.

KBETR is the currency field,so if no value then it displays   like 0.00
if you are working on report,when you have output internal table,declare kbetr as char data type.
move the value from curr value to char data type.
if kbetr = '0.00'.
kbeter = space.
endif.
You have to declare char data type,you can't pass space to currency data type.
Thanks
Seshu

Similar Messages

  • Format a number, pad with spaces

    I want a simple way to format a number into a String, but have it padded with spaces. My code started like this:
    DecimalFormat myFormatter = new DecimalFormat("###.00");
    String output = myFormatter.format(12.5);
    The output is '12.50' when I want ' 12.50' (leading space). There's got to be an easy way to do this!
    Thanks for your help

    What you probably wanted to do was print some numbers in a column (of JTextArea's, for example) so that the decimal points line up.
    I wasted some more time and came up with the following:  String formattedNumber = numberPad(number, "###.00E0");
      static String numberPad(double number, String format) {
        int desiredDecimalPosition = format.indexOf('.');
        DecimalFormat numFormat = new DecimalFormat(format);
        String formattedNum = numFormat.format(Math.abs(number));
        formattedNum = formattedNum.replace('E', 'e');
        int exponentPosition = formattedNum.indexOf('e');
        if (exponentPosition < 0)
          exponentPosition = formattedNum.length();
        formattedNum = formattedNum.replaceFirst("e0", "");
        int decimalPosition = formattedNum.indexOf('.');
        formattedNum = (number > 0 ? " " : "-") + formattedNum;;
        if (decimalPosition < 0)
          decimalPosition = exponentPosition;
        int padding = desiredDecimalPosition - decimalPosition;
        if (padding > 0)
          formattedNum = "        ".substring(8 - padding) + formattedNum;
        return formattedNum;
      }Now it turns out that- despite the fact that I've told DecimalFormat to format precisely 2 digits to the right of the decimal, it sometimes randomly gives me 3, and (less often) 1!
    All this trouble just to try save 16kB of Henrik Bengtsson's sprintf in my jar file...

  • Replacing unauthorized characters with space

    Hi friends,
    There is a set of authorized characters. The authorized characters are
    abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789<space>
    If any character other than these characters should be replaced with space.
    For example, "I like foot-ball" should be changed to "I like foot ball"
    "Where are you?" should be changed to "Where are you"
    "red / blue" should be changed to "red   blue"
    I use Oracle 11.2.
    Thanks in advance!

    Using regular expression you can do this.
    SQL> with t
      2  as
      3  (
      4  select 'I like foot-ball' str
      5    from dual
      6  )
      7  select str
      8       , regexp_replace(str, '[^a-z0-9[:space:]]', ' ', 1, 0, 'i') new_str
      9    from t;
    STR              NEW_STR
    I like foot-ball I like foot ball
    You can read more about regular expression from the document.
    Using Regular Expressions in Oracle Database
    Message was edited by: Karthick_Arp
    Edited the Pattern after seeing franks post.

  • Suppress Underscore and replace with Space in FR

    Hi
    Hyperion Financial Reporting 11.1.2.1
    In the excel, with a Essbase add-in, we have an option as Suppress--->Underscore Characters
    This will eliminate the Underscore and replaces with a space
    I want to know if the same functionality exists in the FR Studio
    Any insight would be much appreciated
    Regards
    Tejo jagadeesh

    Sorry, I misread your question. I thought it would be doable though Conditional Format: http://docs.oracle.com/cd/E17236_01/epm.1112/fr_user/ch10s02.html
    Something like this:
    If Member Name > Dimension > contains > _ > Format Cells > Replace >
    But then it replaces the whole member with space which I believe is not something you are looking for.
    One other option is to have another alias table in your database and select the new alias table in FR. I know this is an option for Essbase. I am not so sure about other db connections.
    Cheers,
    Mehmet

  • Export Excel Table in .txt File with space delimited text in UNICODE Format

    Hi all
    I've a big unsolved problem: I would like to convert an Excel table with some laboratory data in it (descriptions as text, numbers, variables with some GREEK LETTERS, ...). The output should be a formatted text with a clear structure. A very good solution is
    given by the converter in Excel "Save As" .prn File. All works fine, the formattation is perfect (it does not matter if some parts are cutted because are too long), but unfortunately the greek letters are converted into "?"!!!
    I've tried to convert my .xlsx File in .txt File with formatting Unicode and the greek letters are still there! But in this case the format is not good, the structure of a table is gone!
    Do you know how to save an Excel file in .prn but with Unicode formatting instead of ANSI or a .txt with space delimited text?
    Thanks a lot to everyone that can help me!
    M.L.C.

    This solution works in Excel/Access 2013.
    Link the Excel table into Access.
    In Access, right-click the linked table in the Navigation Pane, point your mouse cursor to "Export", and then choose "Text File" in the sub-menu.
    Name the file, and then under "Specify export options", check "Export data with formatting and layout".  Click "OK".
    Choose either Unicode or Unicode (UTF-8) encoding.  Click "OK".
    Click "Close" to complete the export operation.

  • DUMP: replace all occurrences of space in string1 with string2.

    Why does this statement results in a dump:
    replace all occurrences of space in string1 with string2.
    same with
    replace all occurrences of ' ' in string1 with string2.
    string2 is a string without spaces!
    Is there any drawback on using this statements as a workaround?
    while sy-subrc eq 0.
      replace space with string2 into string1.
    endwhile.
    Thanks
    norbert

    Hi,
    See this example i got from ABAPDOCU
    replacing values
    DATA: t4(10) TYPE c VALUE 'abcdefghij',
          string4 LIKE t4,
          str41(4) TYPE c VALUE 'cdef',
          str42(4) TYPE c VALUE 'klmn',
          str43(2) TYPE c VALUE 'kl',
          str44(6) TYPE c VALUE 'klmnop',
          len4 TYPE i VALUE 2.
    string4 = t4.
    WRITE string4.
    REPLACE str41 WITH str42 INTO string4.
    WRITE / string4.
    string4 = t4.
    REPLACE str41 WITH str42 INTO string4 LENGTH len4.
    WRITE / string4.
    string4 = t4.
    REPLACE str41 WITH str43 INTO string4.
    WRITE / string4.
    string4 = t4.
    REPLACE str41 WITH str44 INTO string4.
    WRITE / string4.
    SKIP.
    ULINE.
    Example for condensing strings
    DATA: string9(25) TYPE c VALUE ' one  two   three    four',
          len9 TYPE i.
    len9 = strlen( string9 ).
    WRITE: string9, '!'.
    WRITE: / 'Length: ', len9.
    CONDENSE string9.
    len9 = strlen( string9 ).
    WRITE: string9, '!'.
    WRITE: / 'Length: ', len9.
    CONDENSE string9 NO-GAPS.
    len9 = strlen( string9 ).
    WRITE: string9, '!'.
    WRITE: / 'Length: ', len9.
    SKIP.
    ULINE.
    Thanks & Regards,
    Judith.

  • Formatting an NSURL with spaces

    I've got an input string which most certainly will contain spaces or other "bad" characters, which I want to use in a mailto: url such as
    mailto:[email protected]?body=some string with spaces
    I've been searching but I can't seem any sort of method to properly format the string for an NSURL without breaking it.
    Thanks.

    Scan through the "mailto:" URL docs at http://www.ietf.org/rfc/rfc2368.txt
    There are several characters that need to be encode just like the space. It's simply the % character followed by the two digit hex code of the character.

  • 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

  • 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.

  • 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.

  • 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

  • Warning:Null charecters(00H) contained in the file was replaced with spaces

    Hi,
         i am creating dat file in that at the end of each line i am adding 10 spaces(i.e 00a0) and end of line charecter, than sending to FTP server, but when i am opening file it is giving warning message : Null charecters(00H) contained in the file was replaced with spaces . Pls help me.
    Regards,
    Manoj
    Edited by: manoj kv on Oct 27, 2011 7:07 AM

    Hi,
      Instead at end of each line add a constant of type char with length 10. And then do a carriage return. Check if you still get the error.
    Regds,
    Madan...

  • Find and Replace with space or tab

    Hi,
    I have a text file that has commas separating values. I saved it as a csv, but am not getting the results I need with the csv file. I'd like to replace the commas with a space or a tab.
    I know how to use find replace, but I do not know how to indicate these non-printing characters. I tried the ascii code &#32 for space, but i simply get that string of characters replacing my commas.
    ANy help?
    Thanks

    KW,
    You didn't say what program you were using for the Find and Replace, but I'd suggest that Pages would be your best bet. Spaces can be typed-in directly, and several other non-printing characters can be inserted from a drop-down menu.
    The Insert drop-down seems to be available only in Pages, as opposed to Numbers and TextEdit.
    Jerry

  • 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

  • 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).

Maybe you are looking for