*--Check BOL is assigned to TU or not, if not raise error message DATA lo_tu_query TYPE REF TO /scwm/cl_sr_tu_query. DATA lo_log ...
SAP EWM Help Latest Questions
Inheritance allows one class to reuse the code from another class. In SAP ABAP, this helps in building modular, reusable, and maintainable programs. Use of Inheritance in SAP Purpose
Access specifiers define the visibility and accessibility of class components such as attributes, methods, and events. They help in implementing encapsulation, a core concept of object-oriented programming (OOP), by controlling which parts of a class can be accessed from outside ...
*&———————————————————————* *& Report ZCLASS_TEST_DP_1 *& *&———————————————————————* *& *& *&———————————————————————* REPORT zclass_test_dp_1. *pillars of oop ” abstraction –> hiding the data. ” encapsulation –> variable + methods. –> capsule -> 1 + 1 == ” inheritance –> parent child relation. ” –> child calss will inherit the property of parent class ” polymorphism ” multiple forms –> 1 method — same name and differe param parent ==> child class but with different paremeters. –> method overriding. ” method overloading is not there –> same 2 same name and different parameters. PARAMETERS: p_num TYPE i. DATA: lv_tot TYPE i. CLASS lcl_main DEFINITION. PUBLIC SECTION. METHODS: get_data EXPORTING iv_num TYPE i. METHODS: set_data IMPORTING ev_num TYPE i. PROTECTED SECTION. PRIVATE SECTION. DATA : lv_num1 TYPE i. ENDCLASS. CLASS lcl_main IMPLEMENTATION. METHOD set_data. lv_num1 = ev_num. ENDMETHOD. METHOD get_data. iv_num = lv_num1. ENDMETHOD. ENDCLASS. ” inheritance class lcl_child DEFINITION INHERITING FROM lcl_main. PUBLIC SECTION. METHODS: get_data REDEFINITION. METHODS: set_data REDEFINITION. PROTECTED SECTION. PRIVATE SECTION. data lv_child type i value 4. ENDCLASS. class lcl_child IMPLEMENTATION. method get_Data. ” method overriding * ev_tot = iv_num + iv_num2. ” child will gor the child methods first then to parent method. super->get_data( IMPORTING iv_num = iv_num ). ” way to calling the parent method ENDMETHOD. method set_Data. * ev_tot = iv_num + iv_num2. ” child will gor the child methods first then to parent method. super->set_data( EXPORTING ev_num = ev_num ). ” way to calling the parent method ENDMETHOD. ENDCLASS. START-OF-SELECTION. DATA(lo_obj) = NEW lcl_main( ). DATA(lo_obj_child) = NEW lcl_child( ). lo_obj_child->set_data( EXPORTING ev_num = p_num ).
It’s an ABAP OO class that displays data in a grid (table-like format) inside a screen container. Unlike the simpler CL_SALV_TABLE, this grid is fully interactive and customizable. Main Features Editable cells → You can let users change data directly in the grid. Field ...