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

How to remove zeros from Table control.

Former Member
0 Likes
2,986

hi all,

in table control when i am getting zero quantity in quantity field the table control displays/output showing 0.00 .

i want blank  of this field plz give me solution of this,

Thanks..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,105

Suppose currently, the name of your quantity field is quan.

In the screen, change the screen field name of table control from quan to quan_c and set it to character format.

Also in the program, change the name of quantity field in structure of table control qaun to quan_c (character type of same length).

(Declare field quan as a separate variable to retrieve the value for quantity as was being done before)

Now after you get the value of quan, insert the following statement.

write quan to qaun_c no-zero.


You will get your quantity in the table control if its not zero. If it is zero, it will be displayed as blank.

hi all,

in table control when i am getting zero quantity in quantity field the table control displays/output showing 0.00 .

i want blank  of this field plz give me solution of this,

Thanks..

7 REPLIES 7
Read only

former_member209120
Active Contributor
0 Likes
2,105

Hi,

Change the filed type C.

Regards,

Ramesh.T

Read only

venkateswaran_k
Active Contributor
0 Likes
2,105

Hi Ams.

1. Check your Field attribute - ( As it is controlled by the Quantity domain, it will always displays the Zero..)   If you do not want, then the attribute has to be changed from Quantity to Character field.

2. Secondly, in the code, you need to update the field with SPACE when the value is Zero.

Regards,

Venkat

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,105

Perform some tests, if this field is an actual quatity field, it must been linked to a reference unit key, either from ddic or explicitally in the field definition in dynpro. Look what append when field value is zero or not and reference field is initial or not.

Regards,

Raymond

Read only

Former Member
0 Likes
2,106

Suppose currently, the name of your quantity field is quan.

In the screen, change the screen field name of table control from quan to quan_c and set it to character format.

Also in the program, change the name of quantity field in structure of table control qaun to quan_c (character type of same length).

(Declare field quan as a separate variable to retrieve the value for quantity as was being done before)

Now after you get the value of quan, insert the following statement.

write quan to qaun_c no-zero.


You will get your quantity in the table control if its not zero. If it is zero, it will be displayed as blank.

Read only

0 Likes
2,105

Dear Ams,

It is well described by Susmitha .

Please go ahead with this as i have also faced the same issue in Table control and i followed the same procedure to get rectified.

Regards,

Ruhul

Read only

Former Member
0 Likes
2,105

issue resolved,

Thanks to all ..

Read only

0 Likes
2,105

Could you post your solution for future reference ?