Enhance the Business Object Behavior With Determinations
- How to define determinations
- How to implement determinations
- How to preview and test enhanced travel app
Prerequisites
- You need to have access to an SAP BTP, ABAP environment, or SAP S/4HANA Cloud, ABAP environment or SAP S/4HANA (release 2021 or higher) system.
For example, you can create free trial user on SAP BTP, ABAP environment. - You have downloaded and installed the latest ABAP Development Tools (ADT) on the latest Eclipse© platform.
In the previous exercise, you’ve defined and implemented the early numbering for assigning automatically an identifier (ID) for a new instance of the BO entity Travel.
In the present exercise, you will define and implement a determination, setStatusToOpen
, which will be used to set a default value for the overall status of a Travel entity instance. You will use the Entity Manipulation Language (EML) to implement the transactional behavior of the Travel business object.
Reminder: Do not forget to replace the suffix placeholder ### with your chosen or assigned group ID in the exercise steps below.
About: DeterminationsA determination is an optional part of the business object behavior that modifies instances of business objects based on trigger conditions. A determination is implicitly invoked by the RAP framework if the trigger condition of the determination is fulfilled. Trigger conditions can be modify operations and modified fields.
Further reading: Determinations
About: Entity Manipulation Language (EML)
The Entity Manipulation Language (EML) is an extension of the ABAP language which offers an API-based access to RAP business objects. EML is used to implement the transactional behavior of RAP business objects and also access existing RAP business objects from outside the RAP context.
PS: Some EML statements can be used in the so-called local mode - by using the addition
IN LOCAL MODE
- to exclude feature controls and authorization checks. This addition can currently only be used in RAP business object implementations for the particular RAP business object itself, i. e. not for other RAP business objects.The EML reference documentation is provided in the ABAP Keyword Documentation.
You can use the classic F1 Help to get detailed information on each statement by pressing F1 in the ABAP editors.Further reading: ABAP for RAP Business Objects