class ZCL_EXCEL_HYPERLINK definition public final create private . *"* public components of class ZCL_EXCEL_HYPERLINK *"* do not include other source files here!!! public section. type-pools ABAP . class-methods CREATE_EXTERNAL_LINK importing !IV_URL type STRING returning value(OV_LINK) type ref to ZCL_EXCEL_HYPERLINK . class-methods CREATE_INTERNAL_LINK importing !IV_LOCATION type STRING returning value(OV_LINK) type ref to ZCL_EXCEL_HYPERLINK . methods IS_INTERNAL returning value(EV_RET) type ABAP_BOOL . methods SET_CELL_REFERENCE importing !IP_COLUMN type ZEXCEL_CELL_COLUMN_ALPHA !IP_ROW type ZEXCEL_CELL_ROW . methods GET_REF returning value(EV_REF) type STRING . methods GET_URL returning value(EV_URL) type STRING . *"* protected components of class ZCL_EXCEL_HYPERLINK *"* do not include other source files here!!! protected section. *"* private components of class ZCL_EXCEL_HYPERLINK *"* do not include other source files here!!! private section. data LOCATION type STRING . data CELL_REFERENCE type STRING . data INTERNAL type ABAP_BOOL . data COLUMN type ZEXCEL_CELL_COLUMN_ALPHA . data ROW type ZEXCEL_CELL_ROW . class-methods CREATE importing !IV_URL type STRING !IV_INTERNAL type ABAP_BOOL returning value(OV_LINK) type ref to ZCL_EXCEL_HYPERLINK . *"* local class implementation for public class *"* use this source file for the implementation part of *"* local helper classes *"* use this source file for any type declarations (class *"* definitions, interfaces or data types) you need for method *"* implementation or private method's signature *"* use this source file for any macro definitions you need *"* in the implementation part of the class ABAP method CREATE. data: lo_hyperlink type REF TO zcl_excel_hyperlink. create OBJECT lo_hyperlink. lo_hyperlink->location = iv_url. lo_hyperlink->internal = iv_internal. ov_link = lo_hyperlink. endmethod. METHOD create_external_link. ov_link = zcl_excel_hyperlink=>create( iv_url = iv_url iv_internal = abap_false ). ENDMETHOD. METHOD create_internal_link. ov_link = zcl_excel_hyperlink=>create( iv_url = iv_location iv_internal = abap_true ). ENDMETHOD. METHOD get_ref. ev_ref = row. CONDENSE ev_ref. CONCATENATE column ev_ref INTO ev_ref. ENDMETHOD. method GET_URL. ev_url = me->location. endmethod. method IS_INTERNAL. ev_ret = me->internal. endmethod. METHOD set_cell_reference. me->column = ip_column. me->row = ip_row. ENDMETHOD.