2、"----------------------------------------------------------------------*"*"Local interface:*" EXPORTING*" REFERENCE(ES_MIGO_BADI_SCREEN_FIELDS) TYPE*" ZJIM_BADI_EXAMPLE_SCREEN_FIELD*"----------------------------------------------------------------------* Get all data from
3、 fields of external screen* 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*"-----------------------------------------------------------
4、-----------*"*"Local interface:*" IMPORTING*" 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
5、MOVE-CORRESPONDING is_migo_badi_screen_fields TO ZJIM_badi_exampl.* second fill all GOITEM-fields (displayed on external screen)function:ZJIM_BADI_EXAMPLE_UPDATE_DATA*"----------------------------------------------------------------------*"*"Update function module:*"*"*"Local interfa
6、ce:*" TABLES*" IT_MIGO_BADI_EXAMPLE STRUCTURE ZJIM_BADI_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
7、_EXAMPL'. ENDIF.INCLUDE:LZJIM_BADI001TOPTABLES : Zjim_badi_exampl.到这里增强的准备工作就做完了,下面开始创建实现: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