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: 

difference between check and value table ?

Former Member
0 Kudos

difference between check and value table ?

1 ACCEPTED SOLUTION

paruchuri_nagesh
Active Contributor
0 Kudos

hi

<b>Value table</b>

In some cases you already know when you define a domain that all the fields referring to this domain should be checked against a certain table. This information can be stored in the domain by entering a value table.

The system proposes the value table as check table when you try to define a foreign key for this field. You can override this proposal.

Entering a value table does not implement a check. The check against the value table only takes place when a foreign key is defined.

<b>Check table</b>

Table whose key fields are used to check the foreign key fields Only entries that are contained in the key fields of the check table can be contained in the foreign key fields.

The check table is used to check whether the input values are valid and for the input help (F4 help).

<b>Foreign key</b>A foreign key creates a link between two tables T1 and T2. Every primary key field from T1 (check table) is assigned a field from table T2 (foreign key field). The fields from T2 assigned to primary key fields are marked as foreign key fields.

The most important function of the foreign key is the support of data integrity. The foreign key fields can only accept values which appear in the primary key of the check table. During input the values of the foreign key fields can thus be checked against the entries of the assigned key fields of the check table.

Foreign keys are also the foundation for defining lock objects, maintenance views and help views. These objects contain fields from several tables. All the tables used in such an object must be linked with foreign keys.

reward if u find useful

regards

Nagesh.Paruchuri

5 REPLIES 5

paruchuri_nagesh
Active Contributor
0 Kudos

hi

<b>Value table</b>

In some cases you already know when you define a domain that all the fields referring to this domain should be checked against a certain table. This information can be stored in the domain by entering a value table.

The system proposes the value table as check table when you try to define a foreign key for this field. You can override this proposal.

Entering a value table does not implement a check. The check against the value table only takes place when a foreign key is defined.

<b>Check table</b>

Table whose key fields are used to check the foreign key fields Only entries that are contained in the key fields of the check table can be contained in the foreign key fields.

The check table is used to check whether the input values are valid and for the input help (F4 help).

<b>Foreign key</b>A foreign key creates a link between two tables T1 and T2. Every primary key field from T1 (check table) is assigned a field from table T2 (foreign key field). The fields from T2 assigned to primary key fields are marked as foreign key fields.

The most important function of the foreign key is the support of data integrity. The foreign key fields can only accept values which appear in the primary key of the check table. During input the values of the foreign key fields can thus be checked against the entries of the assigned key fields of the check table.

Foreign keys are also the foundation for defining lock objects, maintenance views and help views. These objects contain fields from several tables. All the tables used in such an object must be linked with foreign keys.

reward if u find useful

regards

Nagesh.Paruchuri

harimanjesh_an
Active Participant
0 Kudos

hi manish,

Generally Value table is at domain level. Example for Plant(werks), T001w is the value table. It contains all the valid plant.

Check table is some other table through which ur field is validated. It is mainly used during foreign key references.

One of the foreign key fields is marked as the check field. This means that the foreign key relationship is maintained for this field.

When an entry is made in the check field, there is a check whether the check table contains a record with the key defined by the values in the foreign key fields. If this is so, the entry is valid. Otherwise the system rejects the entry.

check these links,

For value table:

http://help.sap.com/saphelp_47x200/helpdata/en/e2/667092730811d2959500a0c929b3c3/frameset.htm

For check table:

http://help.sap.com/saphelp_47x200/helpdata/en/ec/62a9ae416a11d1896d0000e8322d00/frameset.htm

http://help.sap.com/saphelp_47x200/helpdata/en/cf/21ea77446011d189700000e8322d00/frameset.htm

Reward me if useful,

Harimanjesh AN

Former Member
0 Kudos

<b>Check table:</b>

A foreign key is a field in a table that is connected to another table via a foreign key relationship. The purpose of the foreign key relationship is to validate the data being entered into one table by checking against a valid set of values in another table. The table that contains the foreign key is called the foreign key table. The table that contains the valid set of values is called the check table .

The field that is validated and on which the foreign key relationship is created is called the foreign key.

<b>Value Table:</b>

Within the domain is the Value Table field. The table named within this field provides the following functions to the domain:

It is automatically proposed as the check table when creating a foreign key

It provides a list of values for F4 (possible entries) help, but it does not provide validation

Whenever you create a foreign key relationship, the system looks in the value table field. If there is a table name there, it proposes that name as the check table.

Reward points for useful answers

Former Member
0 Kudos

Hi,

Difference between a check table and a value table:

<b>Value Table</b> :

This is maintained at Domain Level.

When ever you create a domain , you can entered allowed values. For example you go to Domain SHKZG - Debit/credit indicator. Here only allowed values is H or S.

When ever you use this Domain, the system will forces you to enter only these values.

This is a sort of master check . To be maintained as a customization object. This mean that if you want to enter values to this table you have to create a development request & transport the same.

<b>Check table:</b>

For example you have Employee master table & Employee Transaction table.

When ever an employee Transacts we need to check whether that employee exists , so we can refer to the employee master table.

This is nothing but a Parent & Child relationship . Here data can be maintained at client level , no development involved.

As per DBMS what we call foregin key table, is called as check table in SAP.

There is 1 more important Difference in Value Table and Check Table is that:

1. The contents of the check will be used as an input help(F4 Help) for a particular field on which a check table is assigned.

But the contents of Value Table are never used in Input Help.

The Heirarchy which decides from where to used the Input Help is:

1. Input help defined explicitly in ABAP Program or Dialog Module.

2. Input Help Attached to the referenced Database Table field.

3. Using the contents of Check Table as an input help if neither (1) or (2) help are there.

4. Input help from Fixed value or Value range given in Domain.

Check Table : Master Table

Value Table: Table Across Which All the Values Are Selected

Regards,

Shanmugapriya

**Reward if useful

Former Member
0 Kudos

hi,

A. Check table will be at field level checking.

B. Value table will be at domain level checking

C Value table will be at field level checking

D. Check table will be at domain level checking.

other major differences are:

1)

Value table – It’s a field in a domain it helps in domain level data validation.

Check table – unlike value table it helps in feild level data validation.

2)

check table is nothing bt field level checking & value table is domain level checking.

3)

Value Table - This is maintained at Domain Level.

When ever you create a domain , you can entered allowed values. For example you go to Domain SHKZG - Debit/credit indicator. Here only allowed values is H or S. When ever you use this Domain, the system will forces you to enter only these values. This is a sort of master check . To be maintained as a customization object. This mean that if you want to enter values to this table you have to create a development request & transport the same.

Check table - For example you have Employee master table & Employee Transaction table. When ever an employee Transacts we need to check whether that employee exists , so we can refer to the employee master table. This is nothing but a Parent & Child relationship . Here data can be maintained at client level , no development involved. As per DBMS what we call foregin key table, is called as check table in SAP.

4)

The relational data model contains not only tables, but also relationships between tables. These relationships are defined in the ABAP/4 Dictionary by foreign keys. An important function of foreign keys is to support data integrity in the relational data model. Foreign key fields may assume only those values allowed by the check table, in other words, values occurring in the primary key of the check table.

A foreign key provides a link between two tables, for eg.,T1 and T2 by including a reference in table T1 to the primary key of table T2. For this purpose, Foreign key fields assigned to the primary key fields of T2 are included in T1. Table T1, which is the one being checked, is called a foreign key table, and table T2 is called a check table. The terms dependent (foreign key) table and referenced (check) table are also used.

VALUE TABLE:If the domain of the check field has a value table, this is proposed by the system as check table in the foreign field maintenance. The key fields of the value table are in this case assigned fields of the foreign key table with the same domain. These fields may assume only those values allowed by the value table.

The value range of the domain can be defined by specifying value table.All table fields referring to this domain can then be checked against the corresponding field of this value table.In order the check can be executed, a foreign key must be defined for the value table

5)

Value Table

This is maintained at Domain Level.

When ever you create a domain , you can entered allowed values. For example you go to Domain SHKZG - Debit/credit indicator. Here only allowed values is H or S.

When ever you use this Domain, the system will forces you to enter only these values.

This is a sort of master check . To be maintained as a customization object. This mean that if you want to enter values to this table you have to create a development request & transport the same.

Check table

For example you have Employee master table & Employee Transaction table.

When ever an employee Transacts we need to check whether that employee exists , so we can refer to the employee master table.

This is nothing but a Parent & Child relationship . Here data can be maintained at client level , no development involved.

As per DBMS what we call foregin key table, is called as check table in SAP.

please reward if useful.