addAttribute
Add a DATA, CLASS-DATA, or CONSTANTS attribute to an ABAP class, specify visibility, type, and value, then activate. Use dryRun to preview the diff before writing.
Instructions
Add an attribute or a constant to a class - DATA, CLASS-DATA or CONSTANTS - into the section you name, then activate. Defaults to a private DATA, which is what an attribute usually is; a constant needs a value, and READ-ONLY is only accepted on a public one. Pass dryRun to see the diff without writing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | ABAP type, e.g. string, i, mara-matnr, ztt_foo. | |
| value | No | VALUE for the declaration, written as ABAP: 'X' with the quotes, or 42. | |
| dryRun | No | Show the diff without locking or writing. | |
| static | No | CLASS-DATA rather than DATA. | |
| activate | No | Activate afterwards (default true). | |
| constant | No | CONSTANTS rather than DATA; needs a value. | |
| readOnly | No | READ-ONLY. Public attributes only. | |
| className | Yes | Class name, e.g. ZCL_APP. | |
| transport | No | Transport request for the change. | |
| visibility | No | public, protected or private. Default private. | |
| attributeName | Yes | Name of the new attribute. |