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

Reference tables and Reference Fields

Former Member
0 Likes
7,231

Hi friends,

1. Why do we need Reference table and Reference Fields ? for data types CURR and QUAN?....

2. What is the significance of having a reference table / reference fields>?

3. Where do we create the reference table and field?

Thanks in advance ....

Expecting your answers ...

Cheers

Kripa Rangachari..................

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
4,094

hi,

The reference field means the reference. that means

one table data is in this form

Material quantity amount amount

1 5 10 500

2 3 3 150

from the above data u understand that material 1 of type has 5 cost is 10 and 500 what are those 10 and 500.do u know? definately not.

u need one more table.

Material quantity amount currency key amount currencyk

1 5 10 dollars 500 rupees

2 3 3 dollars 150 rupees

then u clearly identify material of type 1 of quantity 5 is of ammount 10$ or 500rs.

that needs the need of reference fields in sap.

Message was edited by:

sunil kumar

13 REPLIES 13
Read only

Former Member
0 Likes
4,094

Hi.

You must specify a reference table for fields containing quantities (data type QUAN) or currency amounts (data type CURR).

This reference table must contain a field with the format for the currency key (data type CUKY) or unit of measure (data type UNIT). This field is called the reference field of the output field. The reference field can also reside in the table itself.

A field is only assigned to the reference field at program runtime. For example, if a field is filled with currency amounts, the corresponding currency is determined from the assigned reference field, that is the value entered in this field at the moment defines the currency.

Reward points if useful.

Suresh.......

Read only

Former Member
0 Likes
4,094

Hi Suresh,

What do u say i accept ... but my question is ... Y only these two fields are having

such a new approach of assigning to a reference field / reference table?

and where do we create the reference table .... Is it a transparent table?

Cheers

Kripa Rangachari.

Read only

0 Likes
4,094

Hi...

if you are considering the currency .

i say that i am giving u 10.

but what is that 10?

is it 10 INR? or 10 $ or something else?

this is indicated with reference field.

in the same way with Quantity fields also u need to indicate a unit of measure..

This is the significance of reference field.

reference table is the table in which the reference field is present.

this may be the same table or some other trans.table..

Reward points if useful.

Suresh......

Read only

Former Member
0 Likes
4,094

Thanks again suresh,

but still ... I can have to have one GLOABL reference field in one Global Reference table know ...... so that for whatever currency field/ quan field i can refer to the same table / field ..... But Y do i want to create ? and i ve seen many different referece tables and reference fields also ;(

Y needed so many JUNK / Duplicate tables / fields?

Cheers

Kripa Rangachari ......

Read only

0 Likes
4,094

Hi Kripa Rangachari ....

u can have one GLOABL reference field in one Global Reference table know ......

but we are dealing with the businesses that can span across multiple geographical areas that is for example the business may span across India US and Germany.

all these countries have different different currencies so we cannot have a global field in this scenario......

i think now it is clear for you.....

Reward points if useful.

Suresh......

Read only

Former Member
0 Likes
4,094

Hi kripa,

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'.

Read only

Former Member
0 Likes
4,094
Read only

Former Member
0 Likes
4,095

hi,

The reference field means the reference. that means

one table data is in this form

Material quantity amount amount

1 5 10 500

2 3 3 150

from the above data u understand that material 1 of type has 5 cost is 10 and 500 what are those 10 and 500.do u know? definately not.

u need one more table.

Material quantity amount currency key amount currencyk

1 5 10 dollars 500 rupees

2 3 3 dollars 150 rupees

then u clearly identify material of type 1 of quantity 5 is of ammount 10$ or 500rs.

that needs the need of reference fields in sap.

Message was edited by:

sunil kumar

Read only

Former Member
0 Likes
4,094

do u have any douts ask me

Message was edited by:

sunil kumar

Read only

Former Member
0 Likes
4,094

s

Message was edited by:

sunil kumar

Read only

Former Member
0 Likes
4,094

Thanks sunil kumar for your explanation with a simple example ....

Still my question remains ..

Suresh,

Global field which i mentioned is nothing but .... one central reference table and one central reference field for Currency and Quantity field is enough know ....

Y do we want to create again and again is my question ...

Am i still confusing with the question ?

I have anyway understood the need / significance of reference table / reference field

Cheers

Kripa Rangachari.

Read only

Former Member
0 Likes
4,094

Hi......

U can also use them........

but all that depend on ur requirement.......

Reward points if useful.....

Suresh......

Read only

Former Member
0 Likes
4,094

Hi suresh babu linga,

I have anyway awarded points and closed this thread ,

but still ..... "depend on ur requirement" can u give me scenarios?

Thanks in Advance ...

Cheers

Kripa Rangachari.