系统bug, sap同步时 未将 目标金额 (bapisditm-target_val )传输到ecc,
解决方案: 在badi中将这个值传输给ecc。
BADI: CRM_DATAEXCHG_BADI
方法: IF_EX_CRM_DATAEXCHG_BADI~CRM_DATAEXCH_AFTER_BAPI_FILL
DATA: ls_orderadm_i TYPE bad_orderadm_i_mess,
ls_orderadm_h TYPE bad_orderadm_h_mess,
ls_price_i TYPE bad_pricing_i_mess,
ls_cond TYPE bapicond,
ls_condx TYPE bapicondx,
ls_bapisditm TYPE bapisditm,
ls_bapisditmx TYPE bapisditmx,
dd TYPE c.
************************************************************************************
CLEAR: ls_orderadm_h .
READ TABLE it_bus_trans_msg-orderadm_h INTO ls_orderadm_h INDEX 1 .
IF ls_orderadm_h-process_type = 'ZWK1'.
LOOP AT ct_bapisditm INTO ls_bapisditm .
CLEAR: ls_orderadm_i,ls_price_i .
LOOP AT it_bus_trans_msg-orderadm_i INTO ls_orderadm_i
WHERE number_int = ls_bapisditm-itm_number.
READ TABLE it_bus_trans_msg-pricing_i INTO ls_price_i WITH KEY guid = ls_orderadm_i-guid .
* CLEAR: ls_cond ,ls_condx.
* LOOP AT ct_bapicond INTO ls_cond WHERE itm_number = ls_orderadm_i-number_int
* AND cond_type = 'WK00'.
* ENDLOOP.
*
* IF sy-subrc <> 0.
* ls_cond-itm_number = ls_orderadm_i-number_int .
* ls_cond-cond_st_no = '050' .
* ls_cond-cond_count = '01' .
* ls_cond-cond_type = 'WK00' .
* ls_cond-cond_value = ls_price_i-target_value .
* ls_cond-currency = 'CNY' .
* ls_cond-applicatio = 'V' .
* ls_cond-conpricdat = sy-datum .
* ls_cond-calctypcon = 'B' .
* ls_cond-conexchrat = 1 . "默认1
* ls_cond-condorigin = 'C' .
* ls_cond-condvalue = ls_price_i-target_value .
* ls_cond-currency_2 = 'CNY' .
* ls_cond-condcntrl = 'C' .
* ls_cond-condclass = 'B' .
* ls_cond-condchaman = 'X' .
* ls_cond-accountkey = 'ERL' .
* APPEND ls_cond TO ct_bapicond .
*
* ls_condx-itm_number = ls_orderadm_i-number_int .
* ls_condx-cond_st_no = '050' .
* ls_condx-cond_count = '01' .
* ls_condx-cond_type = 'WK00' .
* ls_condx-cond_value = 'X' .
* ls_condx-currency = 'X' .
* ls_condx-cond_unit = 'X' .
* ls_condx-cond_p_unt = 'X' .
* APPEND ls_condx TO ct_bapicondx .
* ENDIF.
ENDLOOP.
ls_bapisditm-target_val = ls_price_i-target_value .
MODIFY ct_bapisditm FROM ls_bapisditm. CLEAR ls_bapisditm .
ENDLOOP.
LOOP AT ct_bapisditmx INTO ls_bapisditmx .
ls_bapisditmx-target_val = 'X' .
MODIFY ct_bapisditmx FROM ls_bapisditmx . CLEAR ls_bapisditmx .
ENDLOOP.
ENDIF.
阅读(1182) | 评论(0) | 转发(0) |