Application Development 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: 

convert_to_local_currency

Former Member
0 Kudos

Hi,

When we use FM convert_to_local_currency or convert_to_foreign_currency,

we have 2 exporting parameters,1. Local currenct and 2.foreign currency.

we have only one currency being used in the program and that is JPY. so how do we use it then.

Let me just explain you once more: In the internal table which we used for upload has netprice as type c length 14. so it correctly populating without any decimal places(10000). But then in the program for netprice we are using domain wert11 whose length is 11 and decimal places 2 because of which the netprice becomes 10000.00 . But currency JPY does not accept price in decimals which is creating the batch input error. How we make sure that 10000 is not changed into 10000.00.

Thanks

5 REPLIES 5

Former Member
0 Kudos

Your problem will not be solved by function modules convert_to_local_currency or convert_to_foreign_currency.

Your problem is due to the fact that you are taking a value held in a character field and putting in into a decimal field. As this is for batch input, are you able to change the wert11 domain to a character domain? You don't need to add the decimal places, and if currency is JPY the batch input will accept 10000.

Regards,

Nick

0 Kudos

Hi Nick,

Yes, the field on the screen is of type wert11.

I'm uploading the PIR data into the standard transaction ME11 using this program.

The report as such is working fine . Only when the batch input sessions are processed we see the error in the session log. The ME11 does not accept decimal value for the currenct JPY.

So the problem is only during the batch input process.

Is there any solution for this.. Pl. let me know.

0 Kudos

Hi,

As you are using batch input your program is presumably filling a table with structure BDCDATA? Passing the amount to field FVAL? As FVAL is type character you don't need to convert the value to decimal first, take the character value from your file, store it in another character field if you need to manipulate the data, then pass it to FVAL for your batch input.

Regards,

Nick

Former Member
0 Kudos

Hi

if your field on the screen is of type wert11

then it won't accept that currency

it should take only with decimals

Are you uploading to std transaction? then let it accept like that only? only when you bring that field data into reports then have to use the conversion in JPY

Regards

Anji

0 Kudos

Yes, the field on the screen is of type wert11.

I'm uploading the PIR data into the standard transaction ME11 using this program.

The report as such is working fine . Only when the batch input sessions are processed we see the error in the session log. The ME11 does not accept decimal value for the currenct JPY.

So the problem is only during the batch input process.

Is there any solution for this.. Pl. let me know.