Hello,
In the General PO, i have a "Currency field" and a "Exchange rate which is Decimal type". I'm working out some calculation where i should multiple the "Currency Field" with "Exchange Rate" and put the result into a "Currency Field".
Came anyone help me how to do this calculation?
Hi Geetha,
Almost all data types in ABAP are inter-convertible.
So I think you can directly go ahead with multiplying currency field with a packed decimal field and assign the result to a currency field.
For eg:
TABLES: SFLIGHT.
DATA: PRICE TYPE SFLIGHT-PRICE.
DATA: A TYPE P decimals 2.
select single price from sflight into price where carrid = 'AA'.
A = '5.20'.
PRICE = PRICE * A.
WRITE PRICE.
Regards,
SP.
Then what is the problem simply multiply the
two fields and put result in currency.
data: a type wrbtr value '10.10'.
data: b type f value '10.10'.
data: c type wrbtr .
c = a * b.
write:/ c.
Regards,
Wasim Ahmed
I have a some clarification, As i said its is in GENERAL PO and when we write a subroutine "all the fields will be converted to character" So now "currency field" and "decimal fields" are there in character data type.
I can possibly multiply both these character fields and save the result in currency field. BUT THE PROBLEM IS DECIMAL POINTS should be taken care.
Example Values to be considered:
Decimal Field Value: 43.52000
Currency Field Vaule: 123456789987654.123
can anyone help me?
Add a comment