The business wants your RAP app to suggest values while users type, for example the likely destination from a free-text description, possibly with AI. How do RAP recommendations work, and how do you keep the suggestions safe?
Say your answer out loud first.
Practise another way
RAP recommendations, available since release 2602, add ranked suggestions to value helps. In the BDEF I mark the target fields with field recommendations, declare a recommendation function and wire it into side effects, triggered by the source fields.
The projection says use recommendations. The function in the behavior pool returns values with scores, from a deterministic rule or from an ISLM-based LLM call. I validate AI output against real master data, and the user always chooses.
What it is. SAP's release news (release 918, 2602) describes RAP recommendations as an enhancement to value helps: context-aware suggestions, either deterministic or AI-based.
Source and target fields are defined in the BDEF, the function is embedded in a side effect, and the values are computed in the behavior pool.
SAP's sample (Flight reference scenario, package rec, cloud branch):
" base BDEF /DMO/R_TRAVELTP_REC
field ( recommendations ) Destination, Accommodation;
recommendation function GetRecommendedValuesFunction;
side effects
{
recommendation function GetRecommendedValuesFunction
executed on field Description, field Destination;
}
" projection BDEF
use recommendations;
use side effects;
Handler signature in the behavior pool:
METHODS GetRecommendedValuesFunction FOR READ
IMPORTING keys FOR FUNCTION Travel~GetRecommendedValuesFunction
RESULT result.
The method reads the instances IN LOCAL MODE, computes candidates and returns them per key in %param, each with a value, a score and a "suggested" flag.
Two strategies in one sample
- Deterministic: accommodations are selected from a table that matches the destination already entered. Cheap, explainable, testable.
- AI-based: destinations come from an LLM prompt over the free-text description, through the ABAP AI SDK (
CL_AIC_ISLM_COMPL_API_FACTORY=>get( )->create_instance( '<ISLM scenario>' ), thenexecute_for_string). The sample then deletes every suggestion that is not a real country from the value help view before returning it.
Keeping it safe
- Treat model output as untrusted input: filter against master data, cap the list, never write it into the record yourself. A recommendation is a suggestion in the value help; the user picks.
- Keep validations unchanged; a recommended value must pass the same checks as a typed one.
- Put prompts and model settings in the ISLM scenario, not hard-coded in the class (the sample's own comment says so). Handle
CX_AIC_COMPLETION_APIby returning no suggestions instead of failing the request. - Mind latency and cost: the side effect fires on field changes, so trigger it on the fields that matter.
Release. RAP recommendations came with release 2602 of the ABAP environment of SAP Business AI Platform (formerly SAP BTP); SAP's TechEd 2025 demo showed them with ISLM. Check availability before planning them on-premise.
Writes the field recommendations, recommendation function and side effect syntax, explains deterministic versus AI sources, and filters AI output against master data.
Fills the field automatically with an LLM answer in a determination, or treats the suggestion as validated data.
Using a determination to write the AI's answer straight into the field. Recommendations only suggest; the user decides and validations still apply.
- Why must the recommendation function be wired through a side effect?
- How would you unit test the recommendation method without calling the LLM?
- When is a determination the better tool than a recommendation?
5 official pages. Confidence: high. Checked 3 Dec 2026.
- Official page Backs the answer.
- Official page Backs the answer.
- Official page Backs the answer.
- Official page Backs the answer.
- Official page Backs the answer.