Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Converting amount field according to user settings

Former Member
0 Kudos
678

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

1 REPLY 1

former_member186052
Active Participant
0 Kudos
305

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