{"id":7739,"date":"2025-09-03T01:15:00","date_gmt":"2025-09-02T19:45:00","guid":{"rendered":"https:\/\/www.sapewmhelp.com\/?question=abstract-entity-in-rap"},"modified":"2025-09-03T01:15:00","modified_gmt":"2025-09-02T19:45:00","slug":"abstract-entity-in-rap","status":"publish","type":"question","link":"https:\/\/www.sapewmhelp.com\/?question=abstract-entity-in-rap","title":{"rendered":"Abstract Entity In RAP"},"content":{"rendered":"<p><strong>Abstract Entity.<\/strong><br \/>\nA CDS abstract entity defines the type attributes of a CDS entity without defining a database<br \/>\nobject.<br \/>\n<strong>CDS abstract entities can be used as<\/strong><\/p>\n<ul>\n<li>\u00a0data types whose type attributes go beyond the regular DDIC structures in the ABAP Dictionary<\/li>\n<li>prototype definitions of data models without being created as instances of a data object.<\/li>\n<\/ul>\n<p><strong>Example:<\/strong><br \/>\nAdministrators can update a seller&#8217;s email via a &#8220;Update Email&#8221; button in the Seller Details form.Clicking the button opens a popup modal displaying the current email, an input field for the newemail, and an optional reason for the update. Validation ensures the new email has a proper format and is not duplicated. On save, an abstract entity processes the update, and the system<br \/>\nrecords the change for compliance.<\/p>\n<p><strong>Create a CDS abstract entity<\/strong><\/p>\n<p><img decoding=\"async\" class=\"content-img\" src=\"https:\/\/www.sapewmhelp.com\/wp-content\/uploads\/2025\/09\/a1.png\" \/><\/p>\n<p>Add it using action in Behavior definition.<\/p>\n<p><img decoding=\"async\" class=\"content-img\" src=\"https:\/\/www.sapewmhelp.com\/wp-content\/uploads\/2025\/09\/a2.png\" \/><\/p>\n<p>Implement the method and modify the field.<\/p>\n<p><img decoding=\"async\" class=\"content-img\" src=\"https:\/\/www.sapewmhelp.com\/wp-content\/uploads\/2025\/09\/a3.png\" \/><\/p>\n<p>In Preview Screen \u2192 Before email update<\/p>\n<p><img decoding=\"async\" class=\"content-img\" src=\"https:\/\/www.sapewmhelp.com\/wp-content\/uploads\/2025\/09\/a4.png\" \/><\/p>\n<p>Email field updated<\/p>\n<p><img decoding=\"async\" class=\"content-img\" src=\"https:\/\/www.sapewmhelp.com\/wp-content\/uploads\/2025\/09\/a5.png\" \/><\/p>\n<p><strong>Conclusion:<\/strong><br \/>\nAbstract entities in RAP applications provide a powerful framework for enhancing modularity, scalability, and reusability by encapsulating shared business logic and ensuring consistent behavior across root entities. This is particularly evident in scenarios like updating a seller&#8217;s email, where an abstract entity centralizes the handling of operations such as validation, transformation, and automated updates. The use of a popup modal for updates, paired with the abstract entity&#8217;s logic, ensures a user-friendly experience, streamlined workflows, and systemwide synchronization. This approach aligns with clean architecture principles, resulting in robust, maintainable, and adaptable applications capable of efficiently meeting current and future requirements.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","question-category":[175],"question_tags":[178,408,201,199,200,177],"class_list":["post-7739","question","type-question","status-publish","hentry","question-category-rap","question_tags-abap","question_tags-abstract-entity","question_tags-btp","question_tags-cds","question_tags-rap","question_tags-sap"],"_links":{"self":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/question\/7739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/question"}],"about":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7739"}],"wp:attachment":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7739"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fquestion-category&post=7739"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fquestion_tags&post=7739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}