createDomain
Creates a fully defined DDIC domain in one call: validates the name, writes type, output format, fixed values or value table, then activates. Prevents incomplete domains that cannot be activated.
Instructions
Create a DDIC domain and give it its definition, in one call: validate the name, create the object, lock it, write the type and output format (and value table or fixed values), unlock, activate. createObject alone leaves a domain with no definition, which cannot be activated. Nothing is rolled back if a step fails - the answer reports each step, and a domain that was created but not written is still there to correct or delete.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Domain name, e.g. ZAPP_STATUS. | |
| style | No | Output style. | |
| dryRun | No | Validate the name and show the document that would be written, creating nothing. | |
| length | Yes | Field length. | |
| activate | No | Activate at the end (default true). | |
| datatype | Yes | DDIC data type, e.g. CHAR, NUMC, DEC, DATS. | |
| decimals | No | Decimal places (default 0). | |
| language | No | Language the texts are stored in, and the master language of the object. Defaults to the logon language - not EN, which is what the underlying library would use and which makes the texts invisible to a developer logged on in another language. | |
| fixValues | No | Fixed values: [{low, high, text}]. | |
| lowercase | No | Lower case allowed. | |
| transport | No | Transport request number - the request itself, not a developer task. Not needed in $TMP. | |
| ampmFormat | No | AM/PM time format. | |
| signExists | No | Value can be negative. | |
| valueTable | No | Value table for the check. | |
| description | Yes | Short description. | |
| packageName | Yes | Development package. $TMP needs no transport. | |
| responsible | No | Responsible user; defaults to the logon user. | |
| outputLength | No | Output length; defaults to the field length. | |
| conversionExit | No | Conversion exit, e.g. ALPHA. |