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

Printing the Zero in Sap Script

Former Member
0 Likes
2,041

Hi All,

I do have an requirement when printing the corrected invoice if the net value is 0 it should be printed as 0.00. But as of now even though the value of that field is stored as 0 in the internal table, when printed it is displayed as empty instead of printing 0.00. Is there any method to print the zeros in sap script.

With Regards,

Naveen

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,412

Hi,

The net value of 0 will be printed as 0.00 if the internal table field refers to the correct amount field which you intend to print.However if you don't want to print 0 in the output if it is blank then you can use (CIZ) before the variable in the sapscript.

Regards

Deepu

Hi All,

I do have an requirement when printing the corrected invoice if the net value is 0 it should be printed as 0.00. But as of now even though the value of that field is stored as 0 in the internal table, when printed it is displayed as empty instead of printing 0.00. Is there any method to print the zeros in sap script.

With Regards,

Naveen

5 REPLIES 5
Read only

Former Member
0 Likes
1,412

Have u used (CIZ) with the field name in the script. If so, then zeroes will not be displayed. Just remove the CIZ from the field and the zero values will also appear.

Manoj

Read only

Former Member
0 Likes
1,412

Hi,

Define a character variable of length 1 and pass the net amount to that variable if value is zero.Put a condition to print the defined character if the net value is zero. else the normal net value has to be printed.

regards,

Read only

Former Member
0 Likes
1,413

Hi,

The net value of 0 will be printed as 0.00 if the internal table field refers to the correct amount field which you intend to print.However if you don't want to print 0 in the output if it is blank then you can use (CIZ) before the variable in the sapscript.

Regards

Deepu

Read only

Former Member
0 Likes
1,412

what is hte data type for that field in the internal table . is it sap standard defined or character.

Number of Decimal Places A program symbol of one of the data types DEC, QUAN, and FLTP can contain decimal place data. Use the option below to override the Dictionary definition for the number of decimal places for the formatting of this symbol value. Syntax &symbol(.N)&

The EKPO-MENGE field contains the value 1234.56. The Dictionary definition specifies 3 decimal places and an output length of 17. &EKPO-MENGE& -> 1,234.560 &EKPO-MENGE(.1) -> 1,234.6 &EKPO-MENGE&(.4) -> 1,234.5600 &EKPO-MENGE&(.0) -> 1,235

can u try tthis in ur form as

&itab-netpr(CR)& or

&itab-netpr(.2)&

regards,

vijay

Read only

Former Member
0 Likes
1,412

Good to see the quick replies.....