RAP Basics Part 2: Data Model Design — Tables, Keys, Administrative Fields and Interface Views
Preview · a free account unlocks the full lesson
Design the persistence and interface layer of a RAP BO: UUID versus semantic keys, the administrative fields RAP needs for ETags and draft (created/changed by/at, local and total last changed), client handling, and building the interface root view entity on top of the table.
In this lessonShow sectionsHide sections
Visual overview
Explanation
Part 1 showed the layers of a RAP business object; now we design the bottom layer — the tables and interface views. A RAP BO starts with its own database tables, one per entity, and the table design is really what decides keys, numbering, and how concurrency gets handled.
The root table, for example ZTRAVEL_A, and child tables such as ZBOOKING_A, are client-dependent, with the client field listed first, and a child table repeats the parent's key as parent_uuid to support the composition relationship. Draft tables, such as ZTRAVEL_D, are generated later directly from the BDEF and should never be designed by hand.
There are really two key strategies. A UUID key (sysuuid_x16) is technical, 16 bytes raw, and filled automatically through "numbering : managed" — this is the simplest option and needs no number range.
A semantic key, by contrast, is a real business number drawn from a number range, which requires either early numbering (via a method) or late numbering (assigned only at save).
A common and practical pattern is to use a UUID as the actual key while filling a separate, semantic ID through a determination on save — keeping a human-readable ID like TravelID next to the UUID key is worthwhile, since users never actually see the UUID itself.
Create a free account to keep reading
You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.
- Full explanation
- Code example
- Real project scenario
- Common mistakes
- Best practices
- Interview angle
One tap with Google works too. Every topic keeps its first lesson open to everyone.
Keep exploring
Interview questions on this topic
Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.