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.
Showing results for 
Search instead for 
Did you mean: 

check table

Former Member
0 Kudos


i have a doubt. how can we write the code to check the fields from check table to foreign key table.

Thanks & Regards,



Active Contributor
0 Kudos

Hi Sunil

Check tables are just to validate data given in the selection screen, it act on the domain level.

its nothing to do with field table primary key.. the check table tells u wheter the value your entered is allowed or not .. thats it..

think u have a domain SUNIL and while creating the domain u said allow only 2 to 7 values in this Domain SUnil... and next day I come and try to enter out of the range 2 to 7 it raises an error..

select single werks from t001w

into lv_werks

where werks eq pa_werks.

if sy-subrc NE 0.

message E001(m001).


award points if useful

Former Member
0 Kudos

Hi Sunil,

This is done by the general property of foreign key relationship.

if u want to check it from your program, then put the data from these two DB tables to your own int tab.

then loop at the int tab which contains data of the foreign key table & READ the data of int tab which contains data of check tab with respect to the foreign key field. if SY-SUBRC is 0 then check is successful, otherwise not.

Reward if useful