Creating a persistent object
ABAP objects provide a persistent object service that allows the developer to store objects in the database. The values of the attributes of the object are stored in appropriate fields of the database table specified. This recipe shows how to define persistent
classes and then how to call them in your application programs.
Getting ready
Prior to storing objects in the database, a suitable database table with the name ZEMP_TABLE
is created to store the values of the objects' attributes. Two fields are defined, NUMBER1 and NAME (the field name NUMBER was not allowed, so NUMBER1 has been used as the field name). Refer to the following screenshot:
How to do it...
Once the database table is defined, a persistence
class must ...
Get SAP ABAP Advanced Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.