Enhancement Framework For Classes

本文介绍了一种增强框架,旨在提供灵活性以扩展现有类,实现预期的业务功能。通过添加新方法、参数及增强现有功能,实现业务流程的精细化控制。重点介绍了预退出方法、退出方法及覆盖退出方法的作用,以及实施增强功能的步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://download.youkuaiyun.com/detail/fengyan5022/9382736

Introduction:
 This Enhancement framework provides flexibility to scale up the existing classes to achieve the expected business functionality. It gives us the advantage of enhancing the global parameters and interface of a class.
Enhancement Features:
1. Adding new methods
2. Adding new parameters
3. Enhancing the existing business functionality
Enhancing Existing Functionality:
1. Pre-exit method
2. Post-exit method
3. Overwrite-exit method
Pre-exit method:
 Pre-exit methods are enhancement points invoked at runtime. This method is executed or triggered before the original method. In general, it is majorly used for validation check before the execution of the logic in the original method. In some cases we may also use this method to get the data to be passed on to the original method.
Post-exit method:
 Post-exit methods are enhancement points invoked at runtime. This method is executed or triggered after the original method. This method can be used to implement the custom logic based on the parameters passed from the original method.
Overwrite-exit method:
 Overwrite-exit methods are enhancement methods identified for replacement at runtime for the original method. In short an overwrite exit method is an enhancement section and the pre-post exit methods are enhancement points.
Step wise approach to implement enhancement:
 In our scenario, let us consider enhancing a copy of standard class “CL_BSP_FLIGHT_DEMO”.

 

1. Create a copy of the class “CL_BSP_FLIGHT_DEMO”- “ZCL_BSP_FLIGHT_DEMO1”.

First we shall understand the usage of pre-exit method.
2. Let us create a simple report program ZTEST_EXIT, which would call the method “CAPITALIZE_STRING”.


 


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值