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 currency amount format.

kowong
Participant
0 Likes
1,625

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

1 ACCEPTED SOLUTION
Read only

Former Member
982

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.

4 REPLIES 4
Read only

Former Member
0 Likes
982

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.

Read only

Former Member
983

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.

Read only

0 Likes
982

Yeah, you got it ... thanks man..

Read only

Former Member
0 Likes
982

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