ABAYTHON

DYNAMIC CASTING IN SAP ABAP

HOW TO DYNAMICALLY CAST AN OBJECT IN SAP ABAP

There are two main issues while casting an object dynamically. METHODS object_casting IMPORTING ir_zcl_sub_class TYPE REF TO zcl_sub_class. METHOD object_casting. DATA lv_super_abstract_class_name TYPE STRING VALUE ‘ZCL_SUPER_ABSTRACT_CLASS’. DATA lr_super_abstract_class TYPE REF TO DATA. CREATE DATA lr_super_abstract_class TYPE REF TO (lv_super_abstract_class_name). lr_super_abstract_class->* ?= ir_zcl_sub_class. WRITE:/ ‘ our super abstract class is casted dynamically and its object instance …

HOW TO DYNAMICALLY CAST AN OBJECT IN SAP ABAP Read More »

How to do Casting to Any Data type in SAP ABAP

Methods Casting_example IMPORTING iv_before_cast TYPE zde_before_cast METHOD Casting_example. DATA lv_after_cast TYPE string VALUE ‘ZDE_AFTER_CAST’ FIELD-SYMBOLS <fs_after_cast> TYPE any. ASSIGNING iv_before_cast TO <fs_after_cast> CASTING TYPE (lv_after_cast) ENDMETHOD.

How to create different SARS COVID variants in SAP ABAP

Required Elements in creating the classifications. Structure – It includes the details such as variant id, variant name, amino acid changes, potential, spread. Interface Definition – The variant details of the sars covid 2 will be handled here. Abstract super class definition – This class implements the interface. The constructor is used to set the …

How to create different SARS COVID variants in SAP ABAP Read More »

How to interpret Inheritance in SAP ABAP object oriented programming

INHERITANCE EXAMPLE CLASS zcl_big_boss DEFINITION PUBLIC CREATE PUBLIC.    PUBLIC SECTION.    METHODS set_name IMPORTING i_name TYPE string.    METHODS get_name EXPORTING e_name TYPE string.    METHODS set_age IMPORTING i_age TYPE int4.    METHODS get_age EXPORTING e_age TYPE int4.    METHODS set_profession IMPORTING i_profession TYPE string.    METHODS get_profession EXPORTING e_profession TYPE string.    PROTECTED …

How to interpret Inheritance in SAP ABAP object oriented programming Read More »

How to do encapsulation in SAP ABAP

CLASS big_boss DEFINITION.    PUBLIC SECTION.    METHODS set_name IMPORTING i_name TYPE string.    METHODS get_name EXPORTING e_name TYPE string.    METHODS set_age IMPORTING i_age TYPE int4.    METHODS get_age EXPORTING e_age TYPE int4.    METHODS set_profession IMPORTING i_profession TYPE string.    METHODS get_profession EXPORTING e_profession TYPE string.    PROTECTED SECTION.    PRIVATE SECTION.    …

How to do encapsulation in SAP ABAP Read More »

In the future we’ll be ‘Data Trash Engineers’.

The next decade will see the emergence of strange new job “data trash engineer” will arrive to replace those made obsolete by robots and automation, but the report’s authors warn that they’ll require society to handle a big shift in education and training. There has been plenty of fear in recent years about the rise of artificial …

In the future we’ll be ‘Data Trash Engineers’. Read More »