Application Development 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: 

creating a ztable

shahid
Product and Topic Expert
Product and Topic Expert
0 Kudos
211

hey guys

i m creating a ztable, like mandt with data element mandt and zno with matnr and zprice as netpr. when i saved it, it takes netpr with data type CURR. and then when i exe it, it tells me tht i need to specify the reference field and table in current/quan tab...

just solve me in resolving this

1 ACCEPTED SOLUTION

amit_khare
Active Contributor
0 Kudos
79

REF table -TCURC

REF Field - WAERS.

7 REPLIES 7

Former Member
0 Kudos
79

<b>Steps to Creating domains, Data Elements, Tables

To give you the steps for creating table:.</b>

There are two approach in creating a table.

<b>

1. Bottom-up approach

2. Top-down approach. </b>

Both are valid and you can choose which approach is suitable for you. I always use the bottom-up approach. Here are the steps to create the tables with this approach.

1. SE11 will take you to the DDIC and enter the name of the new table to be created. Let us say Zname. Click create.

2. Enter the short discription of the table and enter the field of the table. If it is primary key and you have to check the box.

3. Enter the data element and double click it, you will be asked to save and will take you to data element discription page. Enter the short discription of the data element and enter the information of domain like the length of field and type of field.

4. If you wanted to use the existing domain then its fine, or else, you have to create one. Enter the domain name in the data element page and double click it. Page will ask to save and jump to domain creation page.

5. In the domain page, you have to save the information which you have already given in the data elements page and check it. Before going to data element page, you have to activate the domain.

6. Go to data element page and save, check and activate.

7. Go to main table page and save, check, and activate.

8. Also, you have to save the technical settings of the table.

The table is now ready for operation. You can use it in your program or you can use it to enter information.

Check table: It is the table which will have all the information about the Foreign keys which are the primary keys in the check table.

It can be created by creating the foreign key from the main table. Click foreign key in the main table and it will take you to a page which will ask for table name and field to which foreign key relation has to be associated. Enter the information and you can create the check table automatically.

SM30 is used for maintenance of the table, that is to realease the errors occured during the creation of the table.

Well, this is the information I have.

<b>yes .... for CURR and UNIT datatypes fields should & must have an refference tables .....

TCURC for Currceny

for Quantity see the table T001.</b>

reward points if it is usefull ...

Girish

Former Member
0 Kudos
79

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

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 it is usefull .....

Girish

amit_khare
Active Contributor
0 Kudos
80

REF table -TCURC

REF Field - WAERS.

shahid
Product and Topic Expert
Product and Topic Expert
0 Kudos
79

wht abt the reference field and table for quantity ?????

0 Kudos
79

Hi,

if your table contains a field (suppose field A) with data type CURR or QUAN then add one more field (Suppose field B) in the same table with data type CUKY or UNIT and make this field (field B) as a reference field to your CURR or QUAN field A .

The field with data type CURR and QUAN always needs corresponding currency key and unit field .You can not use these fields with these data types in isolation.

You can specify another table field as a reference field also.

shahid
Product and Topic Expert
Product and Topic Expert
0 Kudos
79

wht abt the reference field and table for quantity ?????

Former Member
0 Kudos
79

Hi Shahid,

Since you are using a curr field u need to assign the reference field of curr which will alwayz be a field with data element CUKY. To assign the refererence field double click on the field name of CURR field, one pop screen will appear where you need to give the reference field name(with data element CUKY). the same is done for QUAN field.

Reward Points if it helps

Regards

Tanweer