Posts

Showing posts from February, 2024

Modify operation Code

  CLASS ycl_modify_practice DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. INTERFACES if_oo_adt_classrun . PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS ycl_modify_practice IMPLEMENTATION. METHOD if_oo_adt_classrun ~ main . *MODIFY ENTITY, ENTITIES, field_spec *1->... { FROM fields_tab } * CREATE, CREATE BY, UP☺DATE, DELETE, EXECUTE * For DELETE, EXECUTE we can use this option only * The %control structure must be filled explicitly in the internal table fields_tab for CREATE, CREATE BY and UPDATE * DATA : lt_book TYPE TABLE FOR CREATE yi_travel_tech_m\_Booking. * MODIFY ENTITY yi_travel_tech_m * CREATE FROM VALUE #( * ( % cid = 'cid1' * %data-BeginDate = '20240225' * %control-BeginDate = if_abap_behv=>mk-on * * ) ) * CREATE BY \_Booking * FROM VALUE #( ( %cid_ref = 'cid1' * %target = VALUE #( ( % cid = ...

Read Operation with behavior definition language (BDL) RAP Sample Code

 Read Operation code:-  CLASS ycl_read_ptactice DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. INTERFACES if_oo_adt_classrun . PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS ycl_read_ptactice IMPLEMENTATION. METHOD if_oo_adt_classrun ~ main . *sort form read * READ ENTITY yi_travel_tech_m * FROM VALUE #( ( %key-TravelId = '0000004172' * %control = VALUE #( AgencyId = if_abap_behv=>mk-on * CUSTOMERID = if_abap_behv=>mk-on * BEGINDATE = if_abap_behv=>mk-on * ) * * ) * ) * RESULT DATA(lt_result_short) * FAILED DATA(lt_failed_sort). * * IF lt_failed_sort IS NOT INITIAL. * out->write( 'Read failed' ). * * ELSE. * out->write( lt_result_short ). * ENDIF. * READ ENTITY yi_travel_tech_m * by \_Booking * ALL FIELDS...