ABAP RAP – Advanced

Draft-enabled RAP Objects

Introduction and Context

Objectives of the Exercises

  • Building draft-enabled RAP objects using the Generator tool
  • Based on tables ZBC_PROJECTS, ZBC_TASKS, ZBC_COMMENTS
  • Focus on the practical handling of draft scenarios in ABAP RAP
  • Introduction to modeling, behavior definition, and service generation

Exercise 1: Draft RAP Object for Projects

  • Generation via context menu on table ZBC_PROJECTS
  • Selection of OData UI Service in the wizard
  • Definition of Business Object, Behavior, Projection, and Service Binding
  • Publishing of the Service Binding after generation
  • Verification of administrative data fields in the table

Exercise 2: Draft Object for Tasks and Comments

  • Object setup without UI (UI follows later)
  • Root View Entity for Tasks with composed Comments
  • Important: define semantics for administrative fields
  • Create a draft-enabled behavior definition, including draft tables
  • Implement mappings and draft actions (Edit, Activate, Discard, Resume)
  • Build associations and cardinality for composition relationships

Key Aspects of Both Exercises

  • Use of the Eclipse ADT Generator for quick setup
  • Naming conventions for views, behavior classes, and draft tables
  • Handling of composition and associations in CDS views
  • Use of draft tables and draft actions within the behavior definition

These Fundamentals Provide the Basis for

  • Deeper insights into Draft Handling in ABAP RAP
  • Understanding of UI integration, projections, and side effects
  • Extension, customization, and optimization of draft objects
  • Practical application in Fiori Elements development projects