2011 Nov 15 6:19 AM
Hi,
I have a requirement to convert the amount field ti_saldos-wrbtr ( 528791.00) according to user settings.
ti_saldos-wrbtr is declared of type bseg-wrbtr.
I have declared a variable wrbtr_char(20) TYPE c and used the write statement as below.
WRITE ti_saldos-wrbtr TO ti_saldos-wrbtr_char.
After conversion the value in ti_saldos-wrbtr_char is '528 791,00'.
Now I need to move this value to ti_saldos-wrbtr as this is being used at all places in the program.
But char field wrbtr_char cannot be moved to a currency field ti_saldos-wrbtr.
Please suggest a possible solution for this issue.
Regards,
RK
2011 Nov 15 7:17 AM
Hi,
Goto table USR01
and fetch the DCPFM field from that table by giving BNAME as the USER ID.
This gives the USER SETTING of Decimal value.
if the value is
'X' - IT USES 1,234.50 FORMAT
' ' (SPACE) - IT USES 1.234,50
'Y' - IT USES 1 234,50
So by checking the DCPFM value replace the decimal separators accordingly.
from your current format to that user format.
Hope this helps.
Regards,
-Sandeep