ERPClimb logoERPClimb
RAP Basics
Architect / Cross-trackintermediate 8 min read

RAP Build-Along Part 9: Production Troubleshooting — Metadata, Behavior, Messages and Save

Preview · a free account unlocks the full lesson

Key takeaway

Troubleshoot the Travel app layer by layer: missing fields or actions (metadata), disabled buttons (feature control vs authorization), messages that do not appear, and save failures — with a checklist and the right tools.

In this lessonShow sections

Visual overview

RAP Build-Along Part 9: Production Troubleshooting — Metadata, Behavior, Messages and Save — learning sheetIn one line: Troubleshoot the Travel app layer by layer: missing fields or actions (metadata), disabled buttons (feature control vs authorization), messages that do not appear, and save failures — with a checklist and the right tools.ERPClimb.com / ARCH / LESSON 9/9 / LEARNING SHEETRAP Build-Along Part 9: Production Troubleshooting —Metadata, Behavior, Messages and Save1 · IN ONE LINETroubleshoot the Travel app layer by layer: missing fields or actions (metadata), disabledbuttons (feature control vs authorization), messages that do not appear, and save failures —with a checklist and the right tools.2 · KEY IDEAS EXPLAINEDSymptom: Field Or Action MissingCheck in order:Symptom: Button Disabled Or Action…Disabled button → instance feature control(get_instance_features) returns disabled for thisstate (e.g. travel already accepted). Check the…Enabled but rejected with "notauthorized" → authorization(get_instance_authorizations / global) or roles.Symptom: Error But No Useful MessageValidation fills FAILED but not REPORTED → usersees a generic error. Always add a message.Message not attached to a field → add %element.Symptom: Save Fails Or "Does…Draft: Prepare/Activate returned validation errors(check network or message popover).Total ETag conflict → someone changed the travelmeanwhile.3 · DO · AVOIDBest practice!Common mistakeUse the symptom checklist before debugging.Keep an EML test class per BO for fastreproduction.Always return a message with %element forrejections.✕Debugging code before localizing the layer.✕Confusing feature control (disabled) withauthorization (rejected).✕FAILED entries without REPORTED messages.4 · IN A REAL PROJECTSupport received "Accept button does not work" for some travels. The developer started debugging theaction implementation. Using the checklist, the first step (GET PERMISSIONS in the EML test class) showed theaction was disabled by feature control because those travels already had status "accepted". The…Original ERPClimb learning sheet • Verify against your SAP release and edition

Explanation

Parts 1 through 8 built the Travel app; this final basics lesson is the support checklist you'll actually use week to week, and it's worth localizing the problem to a specific layer first — service/metadata, then behavior (feature control, authorization), then messages, then save. Further detail on each area lives in Service Definitions Part 4, CDS Annotations Part 5, Draft Handling Part 5, and OData V4 Part 5.

When a field or action is missing, check in order: whether the field is in the projection view's (ZC_RAP_Travel) element list, whether the action is listed in the projection behavior definition ("use action acceptTravel;"), whether the entity is exposed in the service definition with the binding refreshed and published, and finally whether $metadata actually contains it.

If it's missing from $metadata, the problem is in the backend layers above; if it's present in $metadata but still not showing, look at UI annotations (such as @UI.lineItem #FOR_ACTION or facets) or at caching.

When a button is disabled or an action gets rejected, the cause is usually one of two things. A disabled button generally means instance feature control (get_instance_features) is returning disabled for the current state — for example, a travel that's already accepted — so check the status. An action that's enabled but rejected with "not authorized" points instead to authorization (get_instance_authorizations or a global check) or roles. You can test which one decided the outcome with EML's GET PERMISSIONS or with a Cross Trace.

Free account

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

Referenced SAP objects

Reviewed reference pages for the objects this page mentions.

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.