1.代码实现
CLASS APC_HANDLER DEFINITION FINAL.
PUBLIC SECTION.
INTERFACES IF_APC_WSP_EVENT_HANDLER_PCP.
DATA MESSAGE TYPE STRING.
ENDCLASS.
CLASS APC_HANDLER IMPLEMENTATION.
METHOD IF_APC_WSP_EVENT_HANDLER_PCP~ON_OPEN. "open
ENDMETHOD.
METHOD IF_APC_WSP_EVENT_HANDLER_PCP~ON_MESSAGE. "message
TRY.
ME->MESSAGE = I_MESSAGE->GET_TEXT( ).
CATCH CX_APC_ERROR INTO DATA(APC_ERROR).
ME->MESSAGE = APC_ERROR->GET_TEXT( ).
CATCH CX_AC_MESSAGE_TYPE_PCP_ERROR INTO DATA(PCP_ERROR).
CL_DEMO_OUTPUT=>DISPLAY( PCP_ERROR->GET_TEXT( ) ).
LEAVE PROGRAM.
ENDTRY.
ENDMETHOD.
METHOD IF_APC_WSP_EVENT_HANDLER_PCP~ON_CLOSE. "close
ME->MESSAGE = 'C
|