Skip to Content
0
5 days ago

abstract class inheritance and method redifinition

59 Views Last edit 5 days ago 2 rev

Hello Expert i'm trying to redefine a method GET_CONDITIONS from the class CL_FTR_RPS_REPAYMENT_SCHEDULE but the redefine method is not triggered.

1) i have a ZCL_FTR_RPS_REPAYMENT_SCHEDULE with a superclass CL_FTR_RPS_REPAYMENT_SCHEDULE

class-zcl-ftr-rps-repayment-schedule.png

i have then redefine the get_condition method

TRY.
CALL METHOD SUPER->GET_CONDITIONS
IMPORTING
et_conditions = ET_CONDITIONS
ev_calc_method = EV_CALC_METHOD
et_mt_conditions = ET_MT_CONDITIONS
.
CATCH cx_ftr_root.
ENDTRY.

but when i call the method it's not trigger, can you explain me what i'm missing?

TRY.
DATA(lo_inst) = zcl_ftr_rps_repayment_schedule=>get_instance_for_db_data(
iv_bukrs = p_bukrs
iv_rfha = p_rfha
).
IF lo_inst IS BOUND.
lo_inst->get_conditions(
IMPORTING
et_conditions = lt_cond
ev_calc_method = ev_calc
).