Domains PDF Print E-mail
User Rating: / 6
PoorBest 
ABAP Tutorials - ABAP Data Dictionary
Written by mastram   
Wednesday, 10 September 2008 17:15

The definition of domain in ABAP is same as that in Mathematics.

In the world of mathematics, a domain is defined as the set of input values that are valid for a given function. The same holds true for domains in ABAP. To understand this, lets first see what is the role of domains in ABAP data dictionary.

Domains -> Data Elements -> (Structures, DB tables, program references etc.)

Domains are attached to data elements and data elements are inturn attached to structures or tables. Lets say we have a field called 'Gender'. The valid gender types will be 'Male' and 'Female'. Thus, for domain 'Gender' the values will be 'Male' and 'Female'. Now this domain can be attached to a data element which in turn can be used in may structures / tables.

Take an example where you want to store the employee master data in a table. This table has a gender field also. Now every time you enter a data record in this table you would like to validate the gender field (should only be either male or female). To do this validation everytime in program could be tedious job. Instead define the domain values appropriately and let the ABAP kernel handle it.

Now let's say you create another table to store the data of passengers. This table will also have a gender field. So instead of creating duplicate data types, the same data element can be used. Here again the validation will happen automatically because the domain used is same.

Now one can imagine that there need not be always a set of fixed values for a domain. Yes, a domain can have a range of values also. It could also point to a value table. Thus any entry will then be validated against a table.

Comments
Add New Search
Write comment
Name:
Email:
 
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
 
Please input the anti-spam code that you can read in the image.

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Last Updated ( Wednesday, 10 September 2008 17:22 )
 

Advertisement

 

Google Search

Advertisement