2007 Sep 25 12:10 PM
Hi all,
I can get amount having format as 500 ,500.0 or 500.00.
But I should always convert it 500.00.
Please let me know how should this be achieved?
Regards
Taranam
2007 Sep 25 12:12 PM
Just declare the result variable as Packed integer with two decimals.
Please reward points if useful.
2007 Sep 25 12:12 PM
Hi,
Define Packed number as
DATA p(13) type p decimals 2.
And move your data to this variable and use this variable for display purpose.
Thanks,CS reddy.
****Please Reward if helpful.
2007 Sep 25 12:12 PM
Just declare the result variable as Packed integer with two decimals.
Please reward points if useful.
2007 Sep 25 12:13 PM
just define the data as DMBTR and it will take care of format itself..
e.g.
parameter : amount type dmbtr obligatory.
write:/ amount.
Reward points if useful, get back in case of query...
Cheers!!!
2007 Sep 25 12:14 PM
Hi,
Look at the below sample program
report zeta_amount.
data: input type bapicurr-bapicurr .
data: c(20) type c.
data: output(15) type p decimals 2.
c = '215,654.54'.
clear sy-subrc.
while sy-subrc = 0.
replace ',' with space into c.
endwhile.
condense c no-gaps.
input = c.
call function 'BAPI_CURRENCY_CONV_TO_INTERNAL'
exporting
currency = 'USD'
amount_external = input
max_number_of_digits = 20
importing
amount_internal = output
* RETURN =
.
check sy-subrc = 0.
Regards
Sudheer
2007 Sep 25 12:14 PM
Hi,
Go to tCode SU01 and input user name and click on change button and go to default tab in that yuo can Decimal Notation to 1,234,567.89.
By this all amount value will be with 2 decimals.
Or if programmatically.
You can declare your internal table field with BSIS-WRBTR.
Thanks,
Sriram Ponna.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |