ABAP Programming Model for SAP Fiori – 11 – Enabling Draft Functionality for Transactional Apps

SAP Fiori , In the earlier chapters on using BOPF to enable CRUD activities, we learned how to directly fetch, create, update, modify, and delete data from databases.However, there won’t be a direct update or insert into the database given our business scenarios.Certain frameworks must be used to manage the business logic.

Draft functionality is necessary in order to handle those logic at runtime and push the data into the database in the correct format. The most crucial feature is that Lock can be enabled automatically without the need for explicit coding or the establishment of Lock Objects.

Now let’s incorporate the Draft feature into our airline data model.The BOPF’s active persistence annotation will be replaced by the draft functionality shown in the code below.The system is being told to temporarily store the data in tables that support drafts. Like parking any document in a typical ECC t-code, that is. When the actual Save operation is carried out on the user interface, the data saved in the draft tables will be committed into actual persistent tables.

To enable Draft functionality, delete the @ObjectModel annotation by following the code below.write “SCARR” as the ActivePersistence.

Any name can be entered for the Draft table name in the annotation of @ObjectModel.writeDraftPersistence:’ZSCARR’. The Draft table will be established after activation. The annotations that were applied to various data models for Draft functionality are shown below.

The generated BO will have a draft handling class and database table, as seen below. In order to ensure that the data is saved into the database in the correct format, more business logic might be included before the database table is actually committed.

Data is moved from draft persistence to active persistence during this phase, which is known as the “Save Sequence Phase.”

Similarly, other nodes will also have their respective Draft tables in it. But there will be only one Draft handling class such that data from child nodes are retrieved by retrieve_by_association() method in the BOPF framework generated class.

In a similar manner, the Draft tables of the other nodes will also be present. However, the BOPF framework-generated class will only contain one Draft handling class where the retrieve_by_association() method is used to retrieve data from child nodes.

Bridging the Clouds: Unleashing the Power of Salesforce and Heroku Integration

What is custom web application?

Fiori App – An Introduction from an ABAPer

Related Posts

11 Steps to Include a New Field in an Already-Existing SAP LSMW Batch Input Recording

Alright. Why in the world do we care about LSMW in this paper when S/4HANA migration cockpit should ideally replace it? 🔥🎥 The simple answer is that not all people…

SAP Fiori App: An ABAPer’s The Beginning

Discover how SAP Fiori App can revolutionize your SAP development approach. This beginner’s guide offers ABAP developers a detailed introduction to Fiori Apps, their features, and how to integrate them…

Leave a Reply

Your email address will not be published. Required fields are marked *

You Missed

Advanced SAPUI5 – 8 – How to Use Python to Get Weight for SAPUI5 Fiori Apps from the Weigh Scale/Weigh Bridge?

  • By Varad
  • January 22, 2025
  • 7 views
Advanced SAPUI5 – 8 – How to Use Python to Get Weight for SAPUI5 Fiori Apps from the Weigh Scale/Weigh Bridge?

How can I configure the SAP PI system and set up NetWeaver Developer Studio (SAP NWDS) for SAP XI/PI/PO?

  • By Varad
  • January 21, 2025
  • 29 views
How can I configure the SAP PI system and set up NetWeaver Developer Studio (SAP NWDS) for SAP XI/PI/PO?

An Object-Oriented Approach to Emailing a PDF Attachment

  • By Varad
  • January 20, 2025
  • 41 views
An Object-Oriented Approach to Emailing a PDF Attachment

How Can I Modify the Master List Item Selection in SAPUI5 Based on Hash Tag URL Changes?

  • By Varad
  • January 19, 2025
  • 30 views
How Can I Modify the Master List Item Selection in SAPUI5 Based on Hash Tag URL Changes?

SAP XI/PI/PO – End-to-End Synchronous Interface Development – Exposing RFC as REST API

  • By Varad
  • January 18, 2025
  • 52 views
SAP XI/PI/PO – End-to-End Synchronous Interface Development – Exposing RFC as REST API

How to Create an Audio Video Multimedia Player in SAPUI5 (Advanced SAPUI5-23)

  • By Varad
  • January 17, 2025
  • 57 views
How to Create an Audio Video Multimedia Player in SAPUI5 (Advanced SAPUI5-23)