Technology Blog Posts by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Arunagirish1
Explorer
565

Augmentation:

  • used to enhance the modify request, before it reaches transactional buffer.
  • augmentation is available for projection bdefs only.
  • the augment methods are called before the create, update method.

Note:

  • it is not possible to set a field in augment which was already set for the original instance. For example, values set in the original request cannot be changed.  Only fields which are unset in the original request can be added.
  • it is not possible to set fields in augment that are defined as read only .

The following operations can be augmented:

  • create
  • update
  • create by association

ABAP EML - MODIFY AUGMENTING ENTITY:

In the augmentation method, it's not recommended to use read, modify eml, as the data has not been moved into the transactional buffer yet. so we need to use a special variant of modify entity, entities, which is only possible in the context of projections bo.

  • for the eml statements, no response parameters can be specified, i.e., the additions failed, mapped, or reported cannot be used.
  • an abap eml modify statement using the addition augmenting must not overwrite fields of the original request. if done, a dump will be thrown.

arunagirish_6-1743432349812.pngimage (5).jpg

Flow of augmentation method in interactive phase:

arunagirish_7-1743432447511.png

Difference between augmentation and determination:

Both Augmentation and determination are similar concept, as both are used to modify the request based on some standard trigger condition. But here are some differences.

arunagirish_0-1743430755323.png

Steps to develop precheck:

 1. Add precheck in standard operation in bdef projection.

arunagirish_2-1743427835364.png

2. Implement the logic for precheck in abap behavior pool.

arunagirish_3-1743427879345.png

Use case:

Requirement: If the user doesn’t provides value for field “name”, Then it should be assigned with an default value “test”, in modify request.

 arunagirish_4-1743427929521.png

arunagirish_5-1743427948367.png

To achieve this, we have added a augmentation in the update operation. Before executing the update method, the entry will beassigned with default value in augmentation method. In the Augmentation method, If the name is empty, we fill default value name using modify augmentation eml.

Code for augmentation in abap behavior pool:

 arunagirish_6-1743428000226.png

Entities importing parameter:

arunagirish_4-1743432310770.png

Reference table for augmenting:

arunagirish_5-1743432332495.png

 

 

Labels in this area