SAP GTM wtew收入确认 冲销 自定义增强开发

1:定义动作类

2:分配动作类到业务步骤

3:SE24 里调用 SE37写的函数。

 

 

 

 

<textarea cols="50" rows="15" disabled="0" name="code" readonly="0" class="cpp">*********收取确认冲销前数据检查调用 ADD BY YM ON 2009.6.18 **** CALL FUNCTION 'ZFI_PRE_CHECK_VF11' EXPORTING i_tew_type = i_tew_type i_step = i_step i_mode = i_mode i_pre_step = i_pre_step item_siv_control = item_siv_control IMPORTING pc_o_msgtx = lc_msgtx EXCEPTIONS zerror = 1 OTHERS = 2. IF sy-subrc &lt;&gt; 0. MESSAGE lc_msgtx TYPE 'E'. ENDIF. </textarea>

 

 

<textarea cols="50" rows="15" disabled="0" name="code" readonly="0" class="c-sharp">FUNCTION zfi_pre_check_vf11. *"---------------------------------------------------------------------- *"*"Local interface: *" IMPORTING *" REFERENCE(I_TEW_TYPE) TYPE WB2_TEW_TYPE *" REFERENCE(I_STEP) TYPE WB2_STEP *" REFERENCE(I_MODE) TYPE WB2_MODE *" REFERENCE(I_PRE_STEP) TYPE WB2_PRE_STEP *" REFERENCE(ITEM_SIV_CONTROL) TYPE SAPI_SIV_ITEM_CTRL_TAB *" EXPORTING *" REFERENCE(PC_O_MSGTX) TYPE CAMSG *" EXCEPTIONS *" ZERROR *"---------------------------------------------------------------------- ***create by ym on 2009.6.18 from CLW,HYL ***fun_des:跨公司类型,存货校验未冲销的收入确认,不允许冲销 DATA:lc_vbeln LIKE vbfa-vbeln,"收入确认号码 9开头 lc_result TYPE char1. ***Step1 判断是否要检查 IF i_tew_type &lt;&gt; 'Z001' OR i_step &lt;&gt; '0022' OR i_mode &lt;&gt; '0006' OR i_pre_step &lt;&gt; '0022' . EXIT. ENDIF. ****Step2 获得确认号参数 DATA:lwa_item TYPE sapi_siv_item_ctrl." READ TABLE item_siv_control INTO lwa_item INDEX 1. IF sy-subrc = 0. lc_vbeln = lwa_item-doc_key+2(10). ENDIF. ***Step3 调用检查函数 CALL FUNCTION 'ZFI_CHECK_IN_VERTIFY_STATUS' EXPORTING vbeln_zz = lc_vbeln IMPORTING xcancel = lc_result . IF lc_result &lt;&gt; 'X'. pc_o_msgtx = '跨公司类型,存货校验未冲销的收入确认,不允许冲销!'. * MESSAGE pc_o_msgtx TYPE 'E'. RAISE zerror. ENDIF. ENDFUNCTION.</textarea>

你可能感兴趣的:(function,table,SAP,interface,reference,fun)