Skip to Content
avatar image
Former Member

How to display amount as blank when its zero in ALV using FACTORY Method

Hi all,

I am using FACTORY method to display ALV.

My problem is with amount field.

Its displaying 0.0 also. In case amount is zero i want to display it as blank.

Please let me know how to achieve this.

Thanka and Regards

Taranam

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 20, 2007 at 08:08 AM

    Hi taranem,

    try this:

    TRY.

    *

    ...

    • Menge is the field of the ITAB where you want to do the settings

    LR_COLUMN ?= LR_COLUMNS->GET_COLUMN( 'MENGE' ).

    LR_COLUMN->SET_VISIBLE( ABAP_TRUE ).

    LR_COLUMN->SET_ZERO( ABAP_FALSE ).

    ...

    *

    CATCH CX_SALV_NOT_FOUND.

    *

    ENDTRY.

    Hope it helps.

    Regards, Dieter

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 08:23 AM

    Hi,

    Make a Character field for your currency field in the outtab.

    Move the value with currency format to the char filed if it is not zero.

    Finally you will get the needful if you display the character field in the output.

    Regards,

    Baburaj

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 08:26 AM

    Hi,

    Refer the following code:

    IF int_final-augdt1 = '00/00/0000'.

    int_final-augdt1 = space.

    ENDIF.

    Hope this helps.

    Reward if helpful.

    Regards,

    Sipra

    Add comment
    10|10000 characters needed characters exceeded