‎2007 Jun 19 8:18 AM
I have tried to create a structure containing different fields from diffrenet tables.
However it asks me reference type, what is reference type, for example for the field of KEPH table's KST001 field... and what is reference field for a field not from a table,assume I want to add Total as integer, what will the reference type be?
Thanks..
Deniz.
‎2007 Jun 19 8:20 AM
‎2007 Jun 19 8:23 AM
Hi Deniz,
For the fields that are currency or quantity you have to add the reference for that.
in you se11 that's a tab call Currency/quantity tab, here u maintained that fields.
Look sample SAP table for your better understanding.
Best Regards,
Victor.
‎2007 Jun 19 8:27 AM
Hi,
Data elements have a business meaning (field label, help text, and so on). Up to and including Release 4.0, it was only possible to specify the technical attributes of a data element by specifying a domain. Each domain had to have a predefined Dictionary type assigned to it. This is still possible. However, it is now possible to enter a predefined Dictionary type directly. If you want to ensure that the technical attributes of a group of data elements can only be changed centrally, you should
continue to use domains.
As part of ABAP Objects, you can now designate a data element a reference type and declare global types for references to global classes or interfaces. Note that, in this case, the type of the data element is no longer elementary, but nested. The same applies when you use the predefined types string and rawstring.
For Reference Type.
Check this URL.
http://help.sap.com/saphelp_nw04/helpdata/en/1a/42923ae53dca62e10000000a11402f/content.htm
For more info check this one.
http://www.ask.com/web?q=Whatisreferencetypein+ABAP&qsrc=1&o=333&l=dir
Reward if it useful.
Regards
‎2007 Jun 19 8:28 AM
hi,
The <u><b>reference field</b></u> 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'.Rgds
Anversha
‎2007 Jun 19 8:30 AM
Hi Deniz,
When you create a structure or a table,
you need to maintain reference fields for the currency fields.
As a reference table, a system table containing all the valid currencies is assigned or any other table which contains a field with the currency key format. This field is called as reference field.
The assignment of the field containing currency amounts to the reference field is made at runtime. The value in the reference field determines the currency of the amount.
<b>In case of quantity field QUAN, reference field will be always of type UNIT,
currency field CURR, reference field will be always of type CUKY.</b>
It is mandatory to specify reference fields when we create fields of quantity/currency type in data base tables.
Hope u will understand this.
Regards:
Sapna.
dont forget to assign points....
‎2007 Jun 19 8:30 AM
hi ..
its does not matter from how many tables u get the fields .
but when u get a field from one table just check its data type
if it has currency r unit then go to Currency/Quantity tab
there u can find one column name.
just add that colum also in u r structure and refere this column in u r structure in
currecny/quantiy tab.