Table Definitions and DALs
In LN, create the following two tables:
- ppmmm901
- ppmmm902
The tables must be created in a VRC that is equal to, or is a predecessor of, the VRC that will contain the generated libraries for the LN business object implementation.
The tables must have the following definition:
Table ppmmm901 – External References for ppmmm001.
Column | Domain | Notes |
---|---|---|
orno | Same as ppmmm001.orno | mandatory |
ref_rkey | A string(40) domain such as tcmcs.st40 | mandatory |
cmba | n/a | combined (orno, ref_rkey), primary key |
cmbb | n/a | combined (orno), reference to ppmmm001.orno, mandatory reference using lookup check |
Note:
Strictly spoken the combined columns are not needed in this case, but they are used to keep the definition consistent for all referential integrity tables.
A mandatory reference to the component’s root table must always be defined; otherwise the CreateRef will not have any effect, because the referential integrity can not be checked.
Table ppmmm902 – External References for ppmmm002:
Column | Domain | Notes |
---|---|---|
orno | Same as ppmmm002.orno | mandatory, part of primary key |
lino | Same as ppmmm002.orno | mandatory, part of primary key |
ref_rkey | A string(40) domain such as tcmcs.st40 | mandatory, part of primary key |
cmba | n/a | combined (orno, lino, ref_rkey), primary key |
cmbb | n/a | combined (orno, lino), reference to ppmmm002.cmba (orno, lino), mandatory reference using lookup check |
Convert the table definitions to runtime. Create the tables in the companies as needed and create a DAL (Data Access Layer) script for each table.
This implies that we cannot define reference tables for BIIs having no mapping to (other) tables. In theory we can, but the referential integrity will not be checked if there is no reference in the data model from the reference table to the business object component’s root table.