Application Development and Automation 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: 
Read only

Displaying zero value on ALV grid

Former Member
0 Likes
5,055

Hi guys...

I have this problem where I can't display Zero on my ALV grid

The field is actually type NUMC.

I've tried setting the field catalog:

V_FIELDCAT-NO_ZERO = SPACE.

V_FIELDCAT-LZERO = C_X.

But on the ALV is still displaying blank.

Any ideas? All help greatly appreciated.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,625

No need to do any changes in Fieldcatalog.

In the output internal table which you are passing to ALV, add the following:

LOOP AT I_OUTPUT into wa_output.

If wa_output-MATNR is initial.

wa_output-MATNR = '0'.

MODIFY i_OUTPUT from wa_output transporting MATNR.

endif.

ENDLOOP.

Hi guys...

I have this problem where I can't display Zero on my ALV grid

The field is actually type NUMC.

I've tried setting the field catalog:

V_FIELDCAT-NO_ZERO = SPACE.

V_FIELDCAT-LZERO = C_X.

But on the ALV is still displaying blank.

Any ideas? All help greatly appreciated.

6 REPLIES 6
Read only

Former Member
0 Likes
2,626

No need to do any changes in Fieldcatalog.

In the output internal table which you are passing to ALV, add the following:

LOOP AT I_OUTPUT into wa_output.

If wa_output-MATNR is initial.

wa_output-MATNR = '0'.

MODIFY i_OUTPUT from wa_output transporting MATNR.

endif.

ENDLOOP.

Read only

Former Member
0 Likes
2,625

Hi,

wherever u wanna display zero

check whether the field is initial and assign '0' to that field if it is initial.

Regards,

Ravi G

Read only

Former Member
0 Likes
2,625

Hi

You have taken NUMC type. This has default value as space. Take numerice type type like I, P,F. Without doing anything, if it is dones not contain any value then it will display Zeros

Regards

Nagaraju<b></b>

Read only

0 Likes
2,625

Hi everyone,

I have assigned 0 to the field already. its just not showing up on my ALV.

Read only

0 Likes
2,625

Anyone? bump

thanks!

Read only

Former Member
0 Likes
2,625

In the output internal table which you are passing to ALV, add the following:

LOOP AT I_OUTPUT into wa_output.

If wa_output-MATNR is initial.

<b>CONCATENATE ''' '0' into wa_output-matnr.</b>

MODIFY i_OUTPUT from wa_output transporting MATNR.

endif.

ENDLOOP.