‎2006 Dec 01 9:50 AM
Hi,
Why do we need to mention currency/quantity fields as reference table and reference field for currency and quantity fields..
‎2006 Dec 01 10:11 AM
Hi kanath,
Currency and Quantity data types are referenced datatypes and they need reference table and reference field
Currency type field --> Currency key type field as reference field
Quantity type field --> Unit type field as reference field
For example
if have amount field value equals to '10', but you need have whether rupees or dollars indication, the reference field does same.
if key is USD --> 10.00 Dollars
JPY --> 10 Yens
If you have quantity field value as '10', we need the units,the reference field does same.
if key is KG --> 10 Kgs
The screen fields values will be displayed based on referenced fields. If you are doing module pool program very careful handle these two fields. we need to do conversions.
Regards
Bhupal Reddy
‎2006 Dec 01 9:54 AM
The reference field is used for the output, the output/input format of a currency field depends on the value of its reference field. (What character is to be used for thousands separator and decimals separator etc) would be decided for that amount field.
‎2006 Dec 01 9:55 AM
hi,
The reference field is used for the output, the output/input format of a currency field depends on the value of its reference field.
For example if you create a screen using the field KONV-KBETR :
the reference field is RV61A-AWEI1:
if you set RV61A-AWEI1 = 3
the value in KONV-KBETR is beeing shown with 3 decimals
So you could see 3,000 but this value is automatically stored as 30.00
if you set RV61A-AWEI1 = 2
the value in KONV-KBETR is beeing shown with 2 decimals
All this convertions are automatically made in according to the value setted in reference field.
You can see this using the statament WRITE with options CURRENCY, try this:
PARAMETERS P_KBETR LIKE KONV-KBETR.
WRITE: P_KBETR CURRENCY '3'.
WRITE: / P_KBETR CURRENCY '2'.
WRITE: / P_KBETR CURRENCY '1'.Regards
Anver
<b><i>pls mark points if helpful</i></b>
‎2006 Dec 01 10:11 AM
Hi kanath,
Currency and Quantity data types are referenced datatypes and they need reference table and reference field
Currency type field --> Currency key type field as reference field
Quantity type field --> Unit type field as reference field
For example
if have amount field value equals to '10', but you need have whether rupees or dollars indication, the reference field does same.
if key is USD --> 10.00 Dollars
JPY --> 10 Yens
If you have quantity field value as '10', we need the units,the reference field does same.
if key is KG --> 10 Kgs
The screen fields values will be displayed based on referenced fields. If you are doing module pool program very careful handle these two fields. we need to do conversions.
Regards
Bhupal Reddy