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

currency/quantity fields

Former Member
0 Likes
3,769

Hi,

Why do we need to mention currency/quantity fields as reference table and reference field for currency and quantity fields..

1 ACCEPTED SOLUTION
Read only

Former Member
984

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

3 REPLIES 3
Read only

Former Member
0 Likes
984

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.

Read only

anversha_s
Active Contributor
0 Likes
984

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>

Read only

Former Member
985

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