2、-----------------------------------------------------------*"*"Local interface:*" EXPORTING*" REFERENCE(ES_MIGO_BADI_SCREEN_FIELDS) TYPE*" ZJIM_BADI_EXAMPLE_SCREEN_FIELD*"----------------------------------------------------------------------* Get all data from fields of external scre
3、en* First move all customer-fields MOVE-CORRESPONDING zjim_badi_exampl TO es_migo_badi_screen_fields.* Second move all GOITEM-fields (displayed on external screen)function:ZJIM_BADI_EXAMPLE_PUT_DATA*"----------------------------------------------------------------------*"*"Local interface:*" I
4、MPORTING*" REFERENCE(IS_MIGO_BADI_SCREEN_FIELDS) TYPE*" ZJIM_BADI_EXAMPLE_SCREEN_FIELD*"----------------------------------------------------------------------* Put all data from fields to external screen* First fill all customer-fields MOVE-CORRESPONDING is_migo_badi_screen_fields TO
5、 ZJIM_badi_exampl.* second fill all GOITEM-fields (displayed on external screen)function:ZJIM_BADI_EXAMPLE_UPDATE_DATA*"----------------------------------------------------------------------*"*"Update function module:*"*"*"Local interface:*" TABLES*" IT_MIGO_BADI_EXAMPLE STRUCTURE ZJIM_BA
6、DI_EXAMPL*"----------------------------------------------------------------------* Databse update: INSERT zjim_BADI_EXAMPL FROM TABLE IT_MIGO_BADI_EXAMPLE. IF sy-subrc <> 0. MESSAGE a398(00) WITH 'Error update MIGO_BADI_EXAMPL'. ENDIF.INCLUDE:LZJIM_BADI001TOPTABLES : Zjim_badi_exampl.到这里增强
7、的准备工作就做完了,下面开始创建实现:1、SE19创建实现2、创建执行类ZCL_IM_JIM_MIGO_BADI,激活ZJIM_MIGO_BADI双击类维护类属性GT_EXTDATA用于数据交换,类型为ZJIM_TY_T_EXTDATA表类型,1、激活以下方法并维护:method IF_EX_MB_MIGO_BADI~INIT.* Regristration of BAdI-Implementation:* Append class attri