2006 Jul 14 11:47 AM
Hi I am Veerendra.
I am having Quatity fields to be printed in scripts. I need to print value like 12.43 when there value afoter '.' is there.
If it is like 12.00 then I should print 12.
Please provide the solution,
Thanks
Veerendra
Hi I am Veerendra.
I am having Quatity fields to be printed in scripts. I need to print value like 12.43 when there value afoter '.' is there.
If it is like 12.00 then I should print 12.
Please provide the solution,
Thanks
Veerendra
2006 Jul 14 11:54 AM
Hello,
/: if &itab-menge(.1)& eq space.
AS &itab-menge(.0)&
/: else.
AS &itab-menge(.2)
/: endif.
Regards,
Naimesh
2006 Jul 14 11:57 AM
Hello,
You can try like this.
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
IF useful reward points.
Regards,
Vasanth
2006 Jul 14 12:02 PM
&X_EKPO-TXZ01(10.2)&
or simply say &X_EKPO-TXZ01(.2)&
Regards,
Srikanth.
2006 Jul 14 12:03 PM
Hi Veerendra,
try tht sample:
REPORT zforum97 .
PARAMETERS val TYPE bseg-wrbtr DEFAULT 12.
DATA cnt type p decimals 2.
DATA vchar(16).
<b>cnt = frac( val ).</b>
IF cnt = 0.
WRITE val TO vchar DECIMALS 0.
ELSE.
WRITE val TO vchar .
TRANSLATE vchar USING ',.'. "for germans
ENDIF.
WRITE vchar.regards Andreas
2006 Jul 14 12:05 PM
Hi Virendra,
Below info should be useful to u.
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
Plz reward with points if found helpful.
Thanks and regards,
Nagendranatha Reddy
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |