2014 Jul 10 4:54 PM
Hi All,
In a payment run, we have 3 lines:
Customer A 50.00
Customer A 50.00
Customer B 673.00
Customer C 10.00
All lines have the currency GBP.
When the payment hits my code:
DATA: l_amount LIKE reguh-rbetr.
DATA: wa_output-amount(17).
WRITE l_amount TO wa_output-amount.
For line 1, it stays as 50.00
For line 2, it changes to 50,00
For line 3, it changes to 673,00
For line 4, it stays as 10.00
Could anyone explain why this happens? I know I can fix this by adding CURRENCY 'GBP' to the end of the write statement but I'd like to understand why it happened in the first place.
Thanks,
Gill
2014 Jul 10 6:25 PM
Hi,
Are you 100% positive you can fix it by CURRENCY addition? I vaguely remember that CURRENCY merely determines the number of digits after decimal point and the decimal notation comes from user master, which can be overriden via SET COUNTRY..?
cheers
Janis
Edit in: yes, the first will be output as 50,00 the second as 50.00 on my system
REPORT zjbtts9.
DATA: p TYPE reguh-rbetr .
DATA: c(32) TYPE c .
p = 50 .
SET COUNTRY 'AT' .
WRITE p TO c CURRENCY 'GBP'.
WRITE: / c.
SET COUNTRY 'GB' .
WRITE p TO c CURRENCY 'GBP'.
WRITE: / c.
Message was edited by: Jānis B
2014 Jul 10 5:22 PM
Hi Gill,
Try defining your output
DATA: wa_output-amount(17) type RBETR.
Regards,
Kannan
2014 Jul 10 6:25 PM
Hi,
Are you 100% positive you can fix it by CURRENCY addition? I vaguely remember that CURRENCY merely determines the number of digits after decimal point and the decimal notation comes from user master, which can be overriden via SET COUNTRY..?
cheers
Janis
Edit in: yes, the first will be output as 50,00 the second as 50.00 on my system
REPORT zjbtts9.
DATA: p TYPE reguh-rbetr .
DATA: c(32) TYPE c .
p = 50 .
SET COUNTRY 'AT' .
WRITE p TO c CURRENCY 'GBP'.
WRITE: / c.
SET COUNTRY 'GB' .
WRITE p TO c CURRENCY 'GBP'.
WRITE: / c.
Message was edited by: Jānis B