Get Class Name
cl_abap_classdescr=>get_class_name methodunun kullanımı
REPORT ZMEHO_TEST_007.
TYPE-POOLS: abap.
DATA: gv_class_name TYPE abap_abstypename.
Data gobj_serial TYPE REF TO ZCL_IM_EM_SERIALNO.
Data gobj_gui TYPE REF TO CL_GUI_OBJECT.
Data gobj_EXCEL TYPE REF TO ZCL_EXCEL_TO_INTERNAL_TABLE.
create object gobj_serial.
create object gobj_gui.
CREATE OBJECT gobj_EXCEL
EXPORTING
progname = sy-repid
ref_structure = `ZCATSDB2`.
gv_class_name = cl_abap_classdescr=>get_class_name( gobj_serial ). write:/ gv_class_name.
gv_class_name = cl_abap_classdescr=>get_class_name( gobj_gui ). write:/ gv_class_name.
gv_class_name = cl_abap_classdescr=>get_class_name( gobj_EXCEL ). write:/ gv_class_name.
OUTPUT
Get Class Name
CLASS=ZCL_IM_EM_SERIALNO
CLASS=CL_GUI_OBJECT
CLASS=ZCL_EXCEL_TO_INTERNAL_TABLE