Register Login

Difference between Value Table and Check Table

Updated Jul 12, 2018

Check Table vs Value Table

It very important to know that a table behaves as both value table and check table but not simultaneously.

Consider a field  F present in a database table DBT. Consider a Table  T (Another database aTable) which behaves as a Value Table and Check Table at different Situations.

Case 1.

When the field F is a primary key for the database table DBT, the table T behaves as a Value Table. We can enter a new value for the field F and values for field F flow from table T the database table DBT. (Field F is the primary key for both the tables T and DBT)

Case 2.

When the field F is a foreign key in the database table DBT, the table T behaves as Check Table. We cannot enter a new value for the field F and Values for field F will be Checked against Table T and only those values present in table T should be given for field F. (Field F is the Primary key in Table T and Foreign Key in Table DBT).

Read Here for More SAP ABAP Interview Questions


Comments

  • 11 May 2017 5:24 pm Sonia Barwar Helpful Answer

    Value table contain all the possible value assigned to the field of the table at domain level. When we press the F4 help button it shows all the possible values for that particular field. In simple words value table means domain level checking.

    Check table on the other hand means Field level checking, For example we have two tables one Product table and other Order table. When an order is placed we need to see whether that product exist so we can refer to Product table.  

    Here Order table becomes check table for Product table. This is nothing but parent child relationship. When there is a foreign key relationship between two tables then the first table is the foreign key table and the table which is used to establish relationship with the second table is the Check table. In simple words foreign key table in DBMS is called Check table in SAP there is no difference.

    A check is not implemented by simply entering a value table! One record of the foreign key table uniquely identifies one record of the check table using the entries in the foreign key fields.The check against the value table only takes effect when a foreign key has been defined.

  • 11 May 2017 5:31 pm Chandan Singh Parihar Helpful Answer

    As i know when we define foriegn key in an value table then its is called as check table. but i dont have clear idea about value table and chech table i have confusion in my mind.

    or

    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.

    or

    check table is nothing bt field level checking & value table is domain level checking. u can understand it with this ex scarr table is check table for carried. 

    or

    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.


×