0% found this document useful (0 votes)
63 views

Check Table Vs Value Table

Check tables are used for field-level validation to check if data exists or does not exist in a table. Value tables are used for domain-level validation and provide a list of allowed values for a field. A table can behave as both a value table and check table in different situations - as a value table when a field is a primary key, and as a check table when a field is a foreign key. The relationships between tables are defined using foreign keys, which allow values from the primary key of one table to be referenced in another table.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views

Check Table Vs Value Table

Check tables are used for field-level validation to check if data exists or does not exist in a table. Value tables are used for domain-level validation and provide a list of allowed values for a field. A table can behave as both a value table and check table in different situations - as a value table when a field is a primary key, and as a check table when a field is a foreign key. The relationships between tables are defined using foreign keys, which allow values from the primary key of one table to be referenced in another table.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CheckTableVsValueTable

CheckTableisforFieldlevelValidationwhereasValuetableisforDomainLevelValidations.
ValueTableproposestableforchecktable.

CheckTable

TheCheckTableisthetableusedbysystemtocheckifadataexistornotexist.

Whilecreatingatableifyouwanttobesurethatafieldcanhavesomevalues
andtheseareinacertaintable,youcangiveITthistableasCHECKTABLE.

ValueTable

ThisismaintainedatDomainLevel.

Wheneveryoucreateadomain,youcanenteredallowedvalues.ForexampleyougotoDomainSHKZG
Debit/creditindicator.
HereonlyallowedvaluesareHorS.

WheneveryouusethisDomain,thesystemwillforceyoutoenteronlythesevalues.

Thisisasortofmastercheck..
Tobemaintainedasacustomizationobject.
Thismeanthatifyouwanttoentervaluestothistableyouhavetocreateadevelopmentrequest&transport
thesame.

Differences:

1)checktablewillcarryoutthecheckforinputvaluesforthetablefieldbeingenteredinanyapplication
andvaluetablewillprovidevaluesonF4helpforthattablefield.

2)Thechecktabledefinestheforeignkeysandispartofthetabledefinition.
Thevaluetableispartofthedomaindefinition.

Itveryimportanttoknowthatatablebehavesasbothvaluetableandchecktablebutnotsimultaneously.

ConsiderafieldFpresentinadatabasetableDBT.
ConsideraTableT(AnotherdatabaseaTable)whichbehavesasaValueTableandCheckTableatdifferent
situations.

Case1.
WhenthefieldFisaprimarykeyforthedatabasetableDBT,thetableTbehavesasaValueTable.Wecanenter
anewvalueforthefieldFandvaluesforfieldFflowfromtableTthedatabasetableDBT.(FieldFistheprimary
keyforboththetablesTandDBT)

Case2.
WhenthefieldFisaforeignkeyinthedatabasetableDBT,thetableTbehavesasCheckTable.Wecannotenter
anewvalueforthefieldFandValuesforfieldFwillbeCheckedagainstTableTandonlythosevaluespresentin
tableTshouldbegivenforfieldF.(FieldFisthePrimarykeyinTableTandForeignKeyinTableDBT).
Seemoreat:http://www.saptechies.org/differencebetweenvaluetablechecktable/#sthash.3skN9fST.dpuf

Therelationaldatamodelcontainsnotonlytables,butalsorelationshipsbetweentables.Theserelationshipsare
definedintheABAP/4Dictionarybyforeignkeys.Animportantfunctionofforeignkeysistosupportdata
integrityintherelationaldatamodel.Foreignkeyfieldsmayassumeonlythosevaluesallowedbythecheck
table,inotherwords,valuesoccurringintheprimarykeyofthechecktable.

Aforeignkeyprovidesalinkbetweentwotables,foreg.,T1andT2byincludingareferenceintableT1tothe
primarykeyoftableT2.Forthispurpose,ForeignkeyfieldsassignedtotheprimarykeyfieldsofT2areincluded
inT1.TableT1,whichistheonebeingchecked,iscalledaforeignkeytable,andtableT2iscalledachecktable.
Thetermsdependent(foreignkey)tableandreferenced(check)tablearealsoused.
VALUETABLE:Ifthedomainofthecheckfieldhasavaluetable,thisisproposedbythesystemaschecktablein
theforeignfieldmaintenance.Thekeyfieldsofthevaluetableareinthiscaseassignedfieldsoftheforeignkey
tablewiththesamedomain.Thesefieldsmayassumeonlythosevaluesallowedbythevaluetable.

Thevaluerangeofthedomaincanbedefinedbyspecifyingvaluetable.Alltablefieldsreferringtothisdomain
canthenbecheckedagainstthecorrespondingfieldofthisvaluetable.Inorderthecheckcanbeexecuted,a
foreignkeymustbedefinedforthevaluetable.
http://sapient.wordpress.com/2007/06/19/whatisachecktableandwhatisavaluetable/

Q:Whatareinternaltableschecktable,valuetable,andtransparenttable?

Answer:Internaltable:Itisastandarddatatypeobject,whichexistsonlyduringtheruntimeoftheprogram.
Checktable:Checktablewillbeatfieldlevelchecking.Valuetable:Valuetablewillbeatdomainlevelchecking
ex:scarrtableischecktableforcarrid.Transparenttable:Existswiththesamestructurebothindictionaryas
wellasindatabaseexactlywiththesamedataandfields.

You might also like