Skip to Content
author's profile photo Former Member
Former Member

Replace '0.00' with Blank

Hi,

In my Smartform Output requirment If amount is Initial I need to Show a Blank .

My variable is XVAR(6) Type P decimals 2.

How do we do that?

Regards

Vara

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 14, 2006 at 09:45 PM

    Hi Vara,

    Can you try this code and let me know your concern, if any.

    data : XVAR(6) Type P decimals 2.

    constants : c_blank(1) type c value ' '.

    if xvar is initial. "or if xvar = '0.00'

    write : c_blank.

    else.

    write : xvar.

    endif.

    Cheers,

    Vikram

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 14, 2006 at 08:54 PM

    hi

    the initial value of numeric field is 0 and character field is space.

    so if you want space then do the below change.

    data:xvar(6) type p decimals 2,

    char(6) type c.

    move xvar to char.

    Cheers,

    Abdul Hakim

    Mark useful answers..

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 14, 2006 at 08:59 PM

    Hi Vara,

    Pls have a look at the code :

    data : XVAR(6) Type P decimals 2.

    constants : c_blank(1) type c value ' '.

    if xvar is initial.

    write : c_blank.

    else.

    write : xvar.

    endif.

    Hope this will give you an idea.

    Cheers,

    Vikram

    pls reward for helpful replies!!

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 14, 2006 at 09:05 PM

    hi vara,

    data: v_blank type c value ''.

    if xvar is initial.

    write v_blank.

    endif.

    award if helpful.

    regards,

    keerthi.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 14, 2006 at 09:18 PM

    Hi,

    when you define a field of type P decimals 2, it will take an default value of '0.00'.

    Why cant you use the code that i have mentioned above?

    Cheers,

    Vikram

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.