Skip to Content
avatar image
Former Member

Supressing zero values in table control

Hi Gurus,

I'm getting data from db table to a table control in screen. But some currency amount data are having the value zero. I don't want to display the zero value but instead I just want the cell to be blank in the table control.

Pls advice how it can be done. Thks.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • Oct 17, 2008 at 08:29 AM

    Hi,

    Try like,

    SHIFT text RIGHT DELETING TRAILING '0'. "or LEFT

    Regards.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 17, 2008 at 08:32 AM

    Hi,

    But how do I do it in a table control. Could you kindly explain with an example. Thks.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 17, 2008 at 08:54 AM

    LVC_S_FCAT-NO_ZERO should be used in an ALV. But I'm using table control in a screen.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 17, 2008 at 08:55 AM

    Go to screen painter.

    Double clock on that field.In attributes select 'Dict' tab and change format to CHAR.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 17, 2008 at 09:01 AM

    In the column, some rows have data and some rows have value zero. But if the change the type to char the entire colum becomes blank/no value.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 17, 2008 at 09:12 AM

    why dont you change data type of currency

    into char in internal table only

    it will differentiate space and 0

    then in PAI move back this character value

    to currency in internal table

    if its input field then u can prevent user to enter

    character value also

    Regards,

    Alpesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 17, 2008 at 09:30 AM

    hi,

    you are moving datas from prg field to screen field in PBO loop statement.you can restic the zero value. like

    if amt ne 0.

    move prg-fld to scr-fld.

    endif.

    Add comment
    10|10000 characters needed characters exceeded