CLASS lcl_selection_screen DEFINITION FINAL CREATE PRIVATE.
PUBLIC SECTION.
CLASS-METHODS call_selection_screen. "call selection screen
CLASS-METHODS at_selection_screen_output. "modify selection screen
CLASS-METHODS at_selection_screen. "input check at selection screen
CLASS-METHODS check_alt_labeling"check, whether alternative labeling is active
RETURNING
value(rv_alt_labeling_active) TYPE abap_bool.
ENDCLASS. "lcl_selection_screen DEFINITION
在LZDEMOTOP下面定义一个类:
2.事务代码SE93中创建事务代码,开始对象中选第三个"Method of a class"
填写的参数如图:
保存之后一个简单的OO transaction就实现了,
每次调用事务代码Z_OO_TCODE_DEMO,
系统都会调用程序SAPLZDEMO中OO_TCODE类的CALL_OO_SCREEN方法,
通过OO transaction可以使程序的初始化更灵活一点(个人感觉)。