createStructure
Create an ABAP structure (TABL/DS) with fields in one call: validates the name, writes the DDL, activates, and verifies. Handles key fields, quantity/currency unit references, and annotations. Use dryRun to preview DDL without creating.
Instructions
Create a structure (TABL/DS) and give it its fields in one call: validate the name, create, write the definition, syntax check, activate, verify. Fields are passed as data - the DDL is built here, including the opening keyword, which differs between releases and is taken from the object the backend just created. A quantity or currency field needs its unit annotation or the activation refuses it: pass unitField or currencyField and the reference is built and qualified for you. A transparent table (TABL/DT) cannot be created over ADT at all on a classic ERP system - see the note in getStructureSource. Nothing is rolled back: the answer says which step stopped and in what state the object was left.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the new structure, e.g. ZDEV_MCP_STRUC. | |
| dryRun | No | Validate the name and show the DDL that would be written, without creating anything. | |
| fields | Yes | The fields, in order: [{name, type, keyField, notNull, annotations}]. type is a data element (WERKS_D) or a built-in type (abap.char(10)). | |
| activate | No | Set false to leave the structure inactive. | |
| language | No | Master language. Defaults to the logon language - creating in EN files the description where nobody will look for it. | |
| transport | No | Transport request number - the request itself, not a developer task. | |
| description | Yes | Description; becomes @EndUserText.label. | |
| packageName | Yes | Package. $TMP for a local object; anything else needs a transport request. | |
| enhancementCategory | No | Enhancement category, default NOT_EXTENSIBLE. Pass e.g. EXTENSIBLE_CHARACTER_NUMERIC. |