Override an object that is defined in a lower layer of code.
Category: layer_control
A method in an underlying layer can be added to by using @Override annotation. The code must contain a super(...) call. That is translated to calling the nearest underlying layer. You can then add code both before and after the call.
In this case the standard code is executed first (by the super call) and then the 4 lines added code are executed.
@Override PROCEDURE Prepare_Insert___ ( attr_ IN OUT VARCHAR2 ) IS BEGIN super(attr_); Client_SYS.Add_To_Attr('PERIOD_STATUS', Acc_Per_Status_API.Decode('O'), attr_); Client_SYS.Add_To_Attr('PERIOD_STATUS_INT', Acc_Per_Status_API.Decode('O'), attr_); Client_SYS.Add_To_Attr('CONSOLIDATED', Consolidated_Yes_No_API.Decode('N'), attr_); Client_SYS.Add_To_Attr('YEAR_END_PERIOD', Period_Type_API.Decode('ORDINARY'), attr_); END Prepare_Insert___;
It is also possible to expand a methods parameter list, by adding DEFAULT parameters.
When adding additional parameters to a method they must be placed last and also have a DEFAULT clause that sets appropriate values in case the method is called with the original set of parameters. In this case, period_status_ is added.
@Override PROCEDURE Prepare_Insert___ ( attr_ IN OUT VARCHAR2, period_status_ IN VARCHAR2 DEFAULT Acc_Per_Status_API.Decode('O')) IS BEGIN super(attr_); Client_SYS.Add_To_Attr('PERIOD_STATUS', period_status_, attr_); Client_SYS.Add_To_Attr('PERIOD_STATUS_INT', Acc_Per_Status_API.Decode('O'), attr_); Client_SYS.Add_To_Attr('CONSOLIDATED', Consolidated_Yes_No_API.Decode('N'), attr_); Client_SYS.Add_To_Attr('YEAR_END_PERIOD', Period_Type_API.Decode('ORDINARY'), attr_); END Prepare_Insert___;
This page is generated from IFS Developer Studio at 2021-03-10 14:56.