‎2008 Apr 24 12:15 PM
Hi Folks,
I have an issue in converting decimal notation to comma notation for France.
I have changed the decimal notation in SU01 from 123.4 to 123,4 but when i run some custom program written by me it is extracting output as 123.4 than 123,4.
So i want to have the output of report to conver all numerical values(from decimal format to comma format) i.e., 123,4 format from the 123.4 format.
Please help me in fixing this issue
Edited by: Nishanth Kumar Reddy Chenchu on Apr 24, 2008 1:16 PM
‎2008 Apr 24 12:21 PM
hi,
Use the following technique.
SPLIT FIELD1 AT '.' INTO FIELD2 FIELD3 .
CONCATENATE FIELD2 ',' FIELD3 INTO FIELD4.
here field1 is 123.4 and field2 --> 123 , field3 -->4
Now concatenate into fieldd4 gives 123,4.
Hope this solves the problem.
Reward points if helpful.
Thanks and regards.
‎2008 Apr 24 12:20 PM
hi,
do this way ...
data : v_char(10) value '122.34'.
translate v_char using '.,'.
write : v_char.
‎2008 Apr 24 12:28 PM
Thanks for the reply.
is there any way other than this by using SET/GET Parameters
‎2008 Apr 24 12:21 PM
hi,
Use the following technique.
SPLIT FIELD1 AT '.' INTO FIELD2 FIELD3 .
CONCATENATE FIELD2 ',' FIELD3 INTO FIELD4.
here field1 is 123.4 and field2 --> 123 , field3 -->4
Now concatenate into fieldd4 gives 123,4.
Hope this solves the problem.
Reward points if helpful.
Thanks and regards.
‎2008 Apr 24 12:22 PM
‎2008 Apr 24 12:25 PM
This will definitly help you:
Replace all occurrences of '.' in var with ',' .
Reward if useful.
Dara.
‎2008 Apr 24 12:28 PM
‎2008 Apr 24 12:34 PM
Hi Nishant,
U can use the statement WRITE TO. This will write the data as per the user settings. When ever user changes his settings like decimal notations then this statement will write the data as per the current settings of the user.
DATA: l_amount1 TYPE wrbtr VALUE '123.45',
l_amount(16) TYPE c.
WRITE:/1 l_amount1.
WRITE l_amount1 TO l_amount.
WRITE:/1 l_amount.
Just copy paste above code in a sample program. First execute this program and note the output. Then change the user settings for decimal notations and log of from SAP(Because user settings will become active only after fresh login). Now execute ur report and see the difference. In this way u no need to change the program when ever user changes his settings.
This thing not pnly applies for amount but also for date, time Quantity fields
Thanks,
Vinod
‎2008 Apr 24 12:45 PM
Hi Nishanth,
The overriding factor for the decimal notaion comes from the customising setting for the country. You can maintain this in the IMG as follows:
Sap Customizing Implementation Guide (transaction SPRO)
-> SAP Netweaver
-> General Settings
-> Set Countries
-> Define Countries in mSAP.com Systems (CRM, ERP, APO, BW, SEM,...)
The above path will lead you to maintenance view V_T005_BAS where you can change the decimal notation for the country.
Once the above has been done you should get the correct decimal notation appearing without having to perform any coding or other workaround.
Hope it helps.
Che
‎2008 Apr 24 2:49 PM
its coz your user setting
goto the transaction( for eg vk12)
system -
>userprofile----->owndata
goto defaults tab..change settings in the format you like...
hope this helps
regards