Chinaunix首页 | 论坛 | 博客
  • 博客访问: 687848
  • 博文数量: 145
  • 博客积分: 3446
  • 博客等级: 中校
  • 技术积分: 1567
  • 用 户 组: 普通用户
  • 注册时间: 2006-08-30 13:58
文章分类

全部博文(145)

文章存档

2021年(1)

2020年(1)

2019年(1)

2018年(6)

2017年(1)

2016年(10)

2015年(12)

2014年(10)

2013年(15)

2012年(33)

2011年(21)

2010年(9)

2009年(18)

2008年(2)

2006年(5)

我的朋友

分类: Web开发

2015-11-23 17:25:15



系统bug, sap同步时 未将 目标金额 (bapisditm-target_val )传输到ecc,

解决方案:  在badi中将这个值传输给ecc。

BADI: CRM_DATAEXCHG_BADI
方法: IF_EX_CRM_DATAEXCHG_BADI~CRM_DATAEXCH_AFTER_BAPI_FILL

 DATAls_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.

************************************************************************************


    CLEARls_orderadm_h .
    READ TABLE it_bus_trans_msg-orderadm_h INTO ls_orderadm_h INDEX .

    IF ls_orderadm_h-process_type 'ZWK1'.

      LOOP AT ct_bapisditm INTO ls_bapisditm .
        CLEARls_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_bapisditmCLEAR 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.
阅读(1142) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~