‎2007 Sep 19 1:23 PM
Dear All,
How do I convert the currency amount format ACCORDING TO USER PROFILE's setting , as what happen in FB01 .
For example, when you fill in 99999.00 it will be changed to 99.999,00 because of the profile setting.
My purpose of this conversion is because when i put this "9999.00" into the BDC session, it comes to me with the error 'not an numeric value' , this is because the user profile i am using have the setting 000.000,00 which the DOT is the 3rd digit separator , and the COMA is the decimal dot.
This BDC will be used for all types of profile setting, so how do i convert that according to the setting ?
Or , do i dont need this coversion ? I did it without any conversion, but it did not work.
Thank you .
Message was edited by:
Kokwei Wong
‎2007 Sep 19 1:34 PM
make use of the WRITE..TO.. statement
Instead of passing the curr field to the BDCDATA table, move the contents of the curr field to a character field using the WRITE...TO.. statement and then pass the character field to the BDCDATA table. The WRITE..TO statement formats the character field according to the user settings.
ex:
write curr_field TO char_field.
‎2007 Sep 19 1:27 PM
In the BDC right before the piece of code where you append the value into the BDCTAB, write your logic to convert the currency amount to the accepted format. Append this value to the BDCTAB. Hope this will help.
‎2007 Sep 19 1:34 PM
make use of the WRITE..TO.. statement
Instead of passing the curr field to the BDCDATA table, move the contents of the curr field to a character field using the WRITE...TO.. statement and then pass the character field to the BDCDATA table. The WRITE..TO statement formats the character field according to the user settings.
ex:
write curr_field TO char_field.
‎2007 Sep 19 3:38 PM
‎2007 Sep 19 1:35 PM
Hi,
Goto table USr01,
check the field DCPFM and change the currency according to the user settings
1.234.567,89
X 1,234,567.89
Y 1 234 567,89
then convert accordingly
REgards
Shiva