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

Zeros displayed as blank in ALV

Hi,

A NUMC value of zero is displayed as blank in ALV grid. Is there a way to show '0' instead of blank?

I noticed that SE16 also displays blank in place of zeros when you view it with ALV grid.

Thanks,

Jay Viswanathan.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 24, 2006 at 04:59 PM

    Hi

    U should create a your own routine for output convertion or use type I field.

    Max

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 24, 2006 at 06:12 PM

    Hi Jay,

    use unpack - Unpack convert the number into plain number as below (0000012345)

    data : v_p(12) type p decimalS 2,

    v_numc(10) type n.

    v_p = '12345'.

    v_numc = FLOOR( V_p ) .

    WRITE V_NUMC.

    V_NUMC WILL HAVE NOW 0000012345.

    OR OR OR OR OR OR OR OR OR OR OR OR OR OR OR

    use to "WRTIE TO" to move the numeric field to character of same length. and then pass to fieldcat.

    data: numeric type n value '000001234',

    charac type c.

    write numeric to charac.

    charac will contain '000001234' to display with 00000's

    thanks

    SDN powered

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 24, 2006 at 06:45 PM

    Hello,

    define that field as charecter.

    ********Poorna********

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 24, 2006 at 06:56 PM

    Hello Jay,

    Ignore my previous post.

    step 1 :- use CONVERSION_EXIT_ALPHA_INPUT (FM)

    This converts any number into a string fill with zeroes-right.

    step 2 :- do the above step over a loop final itab.

    step3 :- pass this final itab to fieldcat.

    This will fix the probelm.

    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.