Posts

Adding virtual elements in RAP.

Image
Virtual elements in RAP are calculated fields — they don't exist in the database table , but you want to show or use them in the UI or response (like Fiori app). These are computed at runtime, for example:     *  A field that shows the status description based on a code.     *  A field that displays a calculated total ( price * quantity ).     *  A field with custom logic that depends on other fields or external data. Steps to implement virtual elements                                     Refer -   Sample example for managed scenario in RAP Step 1:  Create a table with following fields. @EndUserText.label : 'Employee Table' @AbapCatalog.enhancement.category : #NOT_EXTENSIBLE @AbapCatalog.tableCategory : #TRANSPARENT @AbapCatalog.deliveryClass : #A @AbapCatalog.dataMaintenance : #RESTRICTED define table ztl_a...

Determination in RAP

Image
                                                           Refer -  Virtual elements in RAP  What is a Determination in RAP?     *  A determination is a kind of hook method used to determine or calculate values during a RAP operation (e.g., setting default values, calculating totals, etc.). Where is Determination Used? * You define it in the Behavior Definition ( behavior definition ) and implement it in the Behavior Implementation Class ( ABAP class ). Step 1:  Change the behavior definition. managed implementation in class zbp_iv_ab_empl unique; strict ( 2 ); define behavior for ZIV_AB_EMPL //alias <alias_name> persistent table ztl_ab_empl lock master authorization master ( instance ) //etag master <field_name> { create ( authorization : glo...

Adding draft functionality in RAP

Image
               Refer -    Sample example for managed scenario                         Refer -     Validations in Rap Step 1: Adding new fields in main table. @EndUserText.label : 'Student interview details' @AbapCatalog.enhancement.category : #NOT_EXTENSIBLE @AbapCatalog.tableCategory : #TRANSPARENT @AbapCatalog.deliveryClass : #A @AbapCatalog.dataMaintenance : #RESTRICTED define table ztl_ab_rap_stus { key client : abap . clnt not null; key student_id : zde_ab_rap_studen not null; student_name : abap . char ( 30 ); student_i_loc : abap . char ( 20 ); student_i_date : abap . datn ; student_status : abap_boolean ; student_gender : abap . char ( 1 ); description : abap . char ( 6 ); last_chdate : timestampl ; loc_last_chdate : timestampl ; }          * Check and a...