Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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