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

Convert decimal for required user format

bhakti2
Active Participant
0 Likes
2,777

hi,

I need to convert an amount to user format but not the logged in runtime user. It should be a user I am need. I have a user, ill get the decimal format for the user, and then convert the amount value into that format. Not the sy-uname.

its seemingly regular but i cant get any standard code for it.

is there any function module in SRM for it ?

1 REPLY 1
Read only

muttepawar-2009
Active Participant
0 Likes
2,047

I have number in this format 10.000,52.I want to change this format to my User decimal format whcih is entred in SU01.

----

Below sample code to replace dot with comma and viceversa.

while sy-subrc <> 0.

if wf_value eq '.' then

replace '.' with ',' into wf_value

elseif wf_value eq ',' then

replace '.' with '.' into wf_value

endwhile

---

use FM CONVERT_NUMBER.

--

Go to System>User Profile>Own data

Defaults Tab, select the decimal notation type u required.

next time when u give input any number, it will display according to that particular notations

---

Please go to SU01 --> Enter user id --> display --> Anc click on default tab and check the decimal notation.

Declare one field to currency type and then try

Use FM BKK_AMOUNT_CONV_TO_INTERN_MAIN.

you can check by changing the values in su01.but remember your change reflect only when you logoff SAP and again login.so once logoff is needed.

--

I can't change the settings in the SU01.The value is coming from flat file like this '10.500,50'.In this value all commas should be replace with '.' and all '.'with ','.

Or i need to convert this is user decimal format.How can i do tat.

is there any FM to solve this pblm.

---

Below sample code to replace dot with comma and viceversa.

while sy-subrc <> 0.

if wf_value eq '.' then

replace '.' with ',' into wf_value

elseif wf_value eq ',' then

replace '.' with '.' into wf_value

endwhile

--

hope this will be usefull