2007 Oct 25 2:40 AM
I need to select data from table KOMU, including field wrbtr. in 'Currency/Quantity Fields' tab, it's defined to use bkpf-waers.
but how can i find the corresponding record in bkpf? could anyone tell me the relation between these two table?
or is there another way to get the currency field?
thank you!
2007 Oct 25 2:42 AM
Hi Peter,
There is no need to go to BKPF table. You canjust select this field.
Regards,
Atish
2007 Oct 25 2:45 AM
Hi Atish,
thanks for your reply.
I need to output wrbtr in screen, so I think I must use 'write ..... currency....', if I didn't specify the currency, I think maybe the output is not correct.
2007 Oct 25 2:52 AM
Hi Peter,
No, you will not be getting any error. You can just simply get the value of WRBTR and display it in the output.
You need not do anything else.
Regards
Gopi
2007 Oct 25 2:54 AM
Hi Gopi,
you mean I just 'write wrbtr', no currency key specified, right?
if so, could you tell me why?
2007 Oct 25 2:58 AM
for example, if the currency is JPY, i think the result should be wrbtr * 100
2007 Oct 25 3:25 AM
Peter, does this mean that you need to convert the JPY Amount to your local currency Amount.
Then in that case you have to use the FM : CONVERT
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
date = syst-datum
foreign_amount = for_amount
foreign_currency = 'JPY' " Japanese Yen
local_currency = 'SGD' " Sing Dollar
IMPORTING
local_amount = loc_ammount
EXCEPTIONS
no_rate_found = 1
overflow = 2
no_factors_found = 3
no_spread_found = 4
derived_2_times = 5.
Regards
Gopi
2007 Oct 25 3:30 AM
Gopi, but I didn't know what's currency. i.e. the currency may be any currency, so I cann't do as your way.
I'd like to find the related currency key so that I can display amout correctly.
2007 Oct 25 4:36 AM
Hi,
In that case, please retrieve the currency & store it in variable. Pass the variables to the Function Module.
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
date = syst-datum
foreign_amount = for_amount
foreign_currency = L_cur1
local_currency = l_cur2
IMPORTING
local_amount = loc_ammount
EXCEPTIONS
no_rate_found = 1
overflow = 2
no_factors_found = 3
no_spread_found = 4
derived_2_times = 5.
[Code]
Best regards,
Prashant
[code]
2007 Oct 25 4:45 AM
Yes, but me question is how to get the related currency key...
2007 Oct 25 5:09 AM
Hi,
I believe you don't need currency addition in this case.
Check below links for details
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba1ef35c111d1829f0000e829fbfe/content.htm
Regards,
Atish