cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

I have a RAP Read Only application with a button made with CDS Custom Entity.
This throws a popup with value help for user to pick a new departmentcode.

At the METHOD save_modified I am calling the email template created in SE80, the CDS view in email template is the Root CDS View which joins my custom table with sales tables.

The custom table has new departmentcode field which is getting updated.
How do I get the new departmentcode in email CDS instead of old departmentcode please?

0 Likes
View Entire Topic
aravindhan2529
Participant
0 Likes

Hi @sh4il3sh ,

Yes, the email content can remain configurable through the Email Templates application, so future changes to the subject or email body can be made without changing the ABAP code.

The issue here is not the template itself. Since the email is being triggered from save_modified, the updated departmentcode is still in the RAP transactional buffer, while the email template CDS reads the persisted database value. Therefore, the CDS can return the old value.

I would suggest triggering the email after the RAP changes have been successfully saved, so that the CDS data source can read the latest value.

This way, the solution would be:

RAP update → save → email template → CDS → latest value

The email template can then remain completely configurable, without requiring ABAP changes when the customer wants to modify the email text.

SAP references:

 

 

Hope this helps.

Regards,

Aravindhan Chandran 🌿