Scaffold a RAP business object
scaffold_rap_boGenerate a complete RAP managed business-object stack for one root entity including root CDS view, behavior definition, implementation class, projection views, UI metadata, and OData service.
Instructions
Generate the complete, canonical RAP managed business-object stack for one root entity: root CDS view entity, behavior definition (managed, strict(2), optional draft), behavior implementation class with handler locals, projection view with transactional_query, projection behavior definition, UI metadata extension, and an OData V4 service definition — plus a suggested table DDL, the activation order, and next steps. Use this when starting a new RAP business object in ABAP Cloud or S/4HANA and you want correct boilerplate that follows the SAP /DMO reference shape instead of writing it by hand. Generated classes and CDS views are round-trip validated through abaplint at ABAP-Cloud level before being returned; behavior and service definitions are canonical templates (abaplint does not parse those deeply) and ADT activation is the final check. It does not create the table or the service binding (binding is not a source artifact — create it in ADT), and it generates single-entity BOs: model compositions (parent-child) yourself for now. Example: scaffold_rap_bo({ "entityName": "Travel", "sqlTable": "ztravel", "keyField": "travel_id", "fields": [ { "name": "agency_id", "type": "abap.char(6)" } ], "draft": true }).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| draft | No | Generate draft handling (draft table reference, draft actions, use draft). | |
| fields | No | Non-key business fields. Admin fields (created_by/created_at/…) are added automatically. | |
| prefix | No | Customer namespace prefix for all generated names. | Z |
| keyField | Yes | snake_case key field of that table, e.g. "travel_id". | |
| sqlTable | Yes | Persistent table the BO is backed by, e.g. "ztravel". Must start with the namespace prefix. | |
| entityName | Yes | Entity name in UpperCamelCase, e.g. "Travel" — drives ZR_/ZC_/ZBP_/ZUI_ artifact names. | |
| managedUuidKey | No | true (default): UUID key filled by managed numbering — modern RAP default. false: the caller provides the key on create. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | ||
| nextSteps | Yes | What the generator cannot do for you (table, binding, draft table). | |
| activationOrder | Yes | The order to create/activate artifacts in ADT. | |
| validationIssues | Yes | abaplint findings on the generated sources — empty in normal operation. | |
| suggestedTableDdl | Yes | Starting-point DDL for the persistent table; adjust types. |