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

How can i suppress zeros.

Hi,

i have one field cost. Type of that field is numc 10.

i have created one report for displaying the cost. So if cost is 8000 means it will display like 0000008000.

how can i suppress the zeros. please help me.

shyja

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • Best Answer
    Posted on Jan 05, 2008 at 10:43 AM

    Try:

    SHIFT fld LEFT DELETING LEADING '0'.
    

    before using WRITE statement or before passing it the main internal table for ALV output.

    Cheers,

    Sougata.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 05, 2008 at 10:43 AM

    Use the Function Module CONVERSION_EXIT_ALPHA_OUTPUT to remove leading zero's in the output..

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

    EXPORTING

    INPUT = IT_BPPE1-RFISTL

    IMPORTING

    OUTPUT = IT_BPPE1-RFISTL.

    Rewards if useful.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 05, 2008 at 10:45 AM

    use

    unpack <field> to <field>.

    Edited by: Will smith on Jan 5, 2008 11:45 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 05, 2008 at 10:45 AM

    hi,

    Use this function module.

    In the input give the value with leading zeros and result is values without leading zeros

    CONVERSION_EXIT_ALPHA_OUTPUT

    Regards,

    Narayani

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 05, 2008 at 10:47 AM

    Hi,

    If u have developed ALV report, then in the fieldcatlog generation for that field give NO_ZERO = 'X'.

    ls_fieldcat-no_zero = 'X'.

    Rewards points if helpful.

    Regards,

    Srinivas Ch

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 05, 2008 at 10:52 AM

    hi,

    use Condense Keyword

    or

    SHIFT fld LEFT DELETING LEADING '0'.

    or

    CONVERSION_EXIT_ALPHA_OUTPUT

    or

    if u r use ALV

    then in field catalog

    NO_ZERO = 'X'.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 05, 2008 at 11:24 AM

    Hi,

    Please use the below conversion exit to supress zero's.

    CONVERSION_EXIT_ALPHA_OUTPUT

    itab-matnr = '000001234'

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

    EXPORTING

    INPUT = itab-matnr

    IMPORTING

    OUTPUT = itab-matnr.

    here output would be only '1234'.

    Thanks,

    Murali

    .

    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.