‎2007 Dec 22 1:17 PM
Hi,
i have a doubt. how can we write the code to check the fields from check table to foreign key table.
Thanks & Regards,
sunil.
‎2007 Dec 22 2:27 PM
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).
endif.
award points if useful
‎2007 Dec 23 4:42 AM
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
Regards
ANUPAM