Application Development and Automation 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: 
Read only

Converting amount to user's decimal notation

Former Member
0 Likes
6,631

Hi All,

We have a requirement as follows:

Amount = 12500.00.(After final calcuation we get an amount like this).

Now as per the user's decimal notation(Maintained in SU01->Defaults->Decimal notation format) we have to convert this amount to that format.

For Eg: If the user's notation is set as ' '(the notation wil be 1.234.456,89). so according to this the amount given above should be made as 12.500,00.

Can anybody let me know is there any function module/any other option available to convert this as mentioned in the above example.

Thanks in Advance,

Cheers,

Sri

15 REPLIES 15
Read only

keerthy_k
Product and Topic Expert
Product and Topic Expert
0 Likes
4,111

Hi,

If u are writing this value to the list...u dont have to convert...it will automatically be in the format specified in the SU01 transaction for currency.

Keerthi

Read only

Former Member
0 Likes
4,111

We will be using this value in BDC and it will be passed to VA01 pricing screen.

Cheers,

Sri

Read only

Former Member
0 Likes
4,111

Hi,

Use the WRITE statement to move the amount field to Char field and use the char field in BDC.

DATA l_char type char20.

l_Amount = '12500.00'.

WRITE l_amount TO l_char.

the value in l_char would like '12.500,00' ( if the notation wil be 1.234.456,89). that is as per the user notation in SU01

Read only

anuj_srivastava
Active Participant
0 Likes
4,111

This message was moderated.

Read only

0 Likes
4,111

Hi Anuj,

I read the link you have provided...i tried with those options..but still am not able to get it.

Can you please explain little more clearly, so that i can make use of it.

Cheers,

Sri.

Read only

0 Likes
4,111

HI,

You need to use the WRITE..TO.. statment to convert the amount format as per the user profile. Please gothrough my answer in the post.

Read only

0 Likes
4,111

Hi ,

Can u check what is the value for the field in table T005X. ??

Read only

0 Likes
4,111

I used the land as DE and for DE the field XDEZP is ' '

Read only

0 Likes
4,111

Hi Sri ,

So it seems if you are using the write statement then amount will be diaplayed as xx.xxx,yy instead of what the user setting has been done in Su01.

Try these link hope it solves ur problem.

Regards ,

Anuj

Read only

0 Likes
4,111

Hi Sri ,

If we specify the country key the system do not consider the settings from the user master record and searches table T005X for the country key. If the country key exists, the system sets sy-subrc equal to 0 and formats the output of all the 'WRITE' statements according to the settings defined in T005X. If the country key you specified does not exist, the system sets sy-subrc equal to 4 and formats for all 'WRITE' statements with the decimal characters as period '.'.

Regards ,

Anuj

Read only

0 Likes
4,111

Thanks to all for your help and ideas.

Found another solution.

Cheers,

Sri.

Read only

0 Likes
4,111

Hi,

Could u please let me know the solution. i am also facing same probelm..

thanks in advance

Read only

Former Member
0 Likes
4,111

Hi,

write : amount to t_amount.

use field t_amount in bdc.

Read only

Former Member
0 Likes
4,111

Hi Srikirthi,

Could you please let me know how u solved this problem?

Regards

Balu

Read only

0 Likes
4,111

Hi

Could u please let me know the solution. i am also facing same probelm..

Thanks in advance