SAP DDICDDL DEFINE TABLE COMPS



Get Example source ABAP code based on a different SAP table
  


• KEY ABAP_DDIC_DEFINE_TABLE
• NOT NULL ABAP_DDIC_DEFINE_TABLE

ABAP_DDIC_DDL - DEFINE TABLE, field

ABAP_SYNTAX
$[component_annos$]
$[foreign_key_annos$]
$[geo_annos$]
$[KEY$] field : ${data_element $[ foreign_key$]
$[value_help$]$}
$|abap.type$[(n)$|(n,m)$]
$[NOT NULL$];

What does it do?
Defines a single database field in the definition of a DDIC database table using the Dictionary DDL statement DEFINE TABLE.
In front of the field, annotations component_annos can be used to specify the same optional component properties as in the definition of a structure using DEFINE STRUCTURE.
foreign_key_annos can be used to specify the properties of a foreign key dependency defined with foreign_key .
geo_annos specify the properties of a component with the geodata type GEOM_EWKB.
The addition KEY defines the table field as a key field.
field defines the name of the database field.
data_element or abap.type is used to define the data type of the table field. The same rules apply as in the definition of a structure component, except that only elementary types can be specified here.
The addition NOT NULL is used to set the flag for initial values.
The addition foreign_key can be used to define a foreign key dependency for a table field. As a prerequisite, the table field must be typed using a data element.
The addition value_help can be used to assign a search help to a table field whose data type is defined using a data element.
BEGIN_SECTION VERSION 5 OUT This is only useful for table fields used for input fields of dynpros or Web Dynpros (which is not recommended) and the same applies as in the definition of a structure component .
END_SECTION VERSION 5 OUT

ABAP_EXAMPLE_VX5
Definition of DDIC database table DEMO_EXPRESSIONS in the Dictionary DDL of the ABAP Development Tools. The types of all fields are determined directly using built-in data types in the ABAP Dictionary. @EndUserText.label : 'Database table for Expression Examples'
@AbapCatalog.enhancement.category : #NOT_EXTENSIBLE
@AbapCatalog.tableCategory : #TRANSPARENT
@AbapCatalog.deliveryClass : #A
@AbapCatalog.dataMaintenance : #ALLOWED
define table demo_expressions {
key mandt : mandt not null;
key id : char1 not null;
num1 : abap.int4;
num2 : abap.int4;
numlong1 : abap.int8;
numlong2 : abap.int8;
dec1 : abap.dec(31,0);
dec2 : abap.dec(31,10);
dec3 : abap.dec(10,3);
fltp1 : abap.fltp;
fltp2 : abap.fltp;
decf1 : abap.df34_dec(31,0);
decf2 : abap.df34_dec(31,0);
char1 : abap.char(10);
char2 : abap.char(10);
numc1 : abap.numc(10);
numc2 : abap.numc(10);
string1 : abap.string(0);
string2 : abap.string(0);
raw1 : abap.raw(10);
raw2 : abap.raw(10);
xstring1 : abap.rawstring(0);
xstring2 : abap.rawstring(0);
dats1 : abap.dats;
dats2 : abap.dats;
tims1 : abap.tims;
tims2 : abap.tims;
timestamp1 : abap.dec(15,0);
timestamp2 : abap.dec(15,0); }
ABAP_EXAMPLE_END