What are table validations?
Table validation is a concept through which we can restrict invalid entries in a table.
Possible methods/concepts for table validation
1. Field Level validations: We can validate entries at field level with the help of check table concept.
2. Domain level validations: We can restrict entries at the domain level with the help of fixed values of the domain and value table of the domain.
What is a check table?
It is a table which contains all valid entries of a field.
What is value table?
It is a table which contains all valid entries
What are fixed values for the domain?
These are allowed values for a domain ex: GENDER (domain).
Creating check table for table validations.
Step1: Go to SE11, create a table ZSTUDENT_CHECK as below
Go to SE11, provide name as ZSTUDENT_CHECK and click on create.
Provide delivery class and display maintenance allowed.
Go to fields tab and add a field as below
Click on technical settings button and provide data class and size category.
Go to utilities- table contents - create
Similarly add some more entries.
Step2: Add ZSTUDENT_CHECK as check table for ZSTUDENT_TABLE
Go to SE11, provide
Go to tab Entry help/check, select city fields and click on 'Foreign key' icon.
Provide short text, check table name ZSTUDENT_CHECK and click on 'Generate Proposal' and click on copy.
A Check table will be assigned to CITY field
Save and activate the table
Now go to utilities - table entries -> create entries
Provide a city name which is not in ZSTUDENT_CHECK table and try to save, it will