2008 Aug 25 9:12 PM
I have a report that needs to display the DEC16_3 value
19837000.000
Like this
19,837,000.00
I thought the following would work:
write gt_cpr_report-covered_volume to gv_str_covered_volume right-justified decimals 2.But, instead, it write it like this:
19837,000.00
I've NO idea why it displayed like that. What's the easiest way to display a value with thousands separator with two digits?
THANKS IN ADVANCE!
<LOCKED BY MODERATOR - URGENT, PLEASE HELP OR SIMILAR ARE FORBIDDEN>
Edited by: Alvaro Tejada Galindo on Aug 25, 2008 5:08 PM
2008 Aug 25 9:22 PM
Try like this:
data: p_dec3 type DEC16_3,
p_dec2 type p decimals 2.
p_dec3 = '12345678.900'.
write: p_dec3.
p_dec2 = p_dec3.
write: / p_dec2.
Regards,
Naimesh Patel
I have a report that needs to display the DEC16_3 value
19837000.000
Like this
19,837,000.00
I thought the following would work:
write gt_cpr_report-covered_volume to gv_str_covered_volume right-justified decimals 2.But, instead, it write it like this:
19837,000.00
I've NO idea why it displayed like that. What's the easiest way to display a value with thousands separator with two digits?
THANKS IN ADVANCE!
<LOCKED BY MODERATOR - URGENT, PLEASE HELP OR SIMILAR ARE FORBIDDEN>
Edited by: Alvaro Tejada Galindo on Aug 25, 2008 5:08 PM
2008 Aug 25 9:22 PM
Try like this:
data: p_dec3 type DEC16_3,
p_dec2 type p decimals 2.
p_dec3 = '12345678.900'.
write: p_dec3.
p_dec2 = p_dec3.
write: / p_dec2.
Regards,
Naimesh Patel
2008 Aug 25 9:24 PM
Steve,
I think your problem is the result of your output field not being large enough to hold the results of the write statement. The following code ...
DATA: input(9) TYPE p DECIMALS 3 VALUE '19837000.000',
output1(13) TYPE c,
output2(20) TYPE c.
WRITE input TO output1
left-JUSTIFIED DECIMALS 2.
write: / output1.
WRITE input TO output2
left-JUSTIFIED DECIMALS 2.
write: / output2.
... results in output as follows:
19837,000.00
19,837,000.00
I hope this helps ...
Duane
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |