Chinaunix首页 | 论坛 | 博客
  • 博客访问: 710405
  • 博文数量: 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)

我的朋友

分类:

2011-06-13 21:48:46

DATA s_centr TYPE bapibus1006_central.
  DATA s_org TYPE bapibus1006_central_organ.
  DATA s_adress TYPE bapibus1006_address.
  DATA t_tele LIKE bapiadtel OCCURS 0 WITH HEADER LINE.
  DATA t_fax LIKE bapiadfax OCCURS 0 WITH HEADER LINE.
  DATA t_tele1 LIKE bapiadtel OCCURS 0 WITH HEADER LINE.
  DATA t_fax1 LIKE bapiadfax OCCURS 0 WITH HEADER LINE.
  IF s_bp IS NOT INITIAL.
    CLEAR: s_org,s_adress,s_centr.
    REFRESH: t_tele,t_tele1,t_fax,t_fax1.
    CLEAR: t_tele,t_tele1,t_fax,t_fax1.
    s_centr-searchterm1 = s_bp-bu_sort1.
    s_org-name1 = s_bp-name_org1.
    s_org-name3 = s_bp-manager.
    s_org-name4 = s_bp-buyer.
    s_adress-street = s_bp-street .
    s_adress-postl_cod1 = s_bp-post_code1.
    s_adress-country = s_bp-country.
    s_adress-region = s_bp-region.
    s_adress-city = s_bp-city1.

    t_tele-country = s_bp-country.
    t_tele-telephone = s_bp-tel_number.
    t_tele-r_3_user = '1'.
    APPEND t_tele.
    t_tele-telephone = s_bp-mob_number.
    t_tele-r_3_user = '3'.
    APPEND t_tele.
    t_tele1-country = s_bp-country.
    t_tele1-telephone = s_bp-fax_number.
    APPEND t_tele1.
    t_fax-country = s_bp-country.
    t_fax-fax = s_bp-b_tel.
    APPEND t_fax.
    t_fax1-country = s_bp-country.
    t_fax1-fax = s_bp-fox.
    APPEND t_fax1.
    CALL FUNCTION 'BAPI_BUPA_CREATE_FROM_DATA'
      EXPORTING
        partnercategory         = '2'
        centraldata             = s_centr
        partnergroup            = s_bp-bu_group
        centraldataorganization = s_org
        addressdata             = s_adress
      IMPORTING
        businesspartner         = partner
      TABLES
        telefondata             = t_tele
        faxdata                 = t_fax
        telefondatanonaddress   = t_tele1
        faxdatanonaddress       = t_fax1.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.  "可以写在loop里面
  ENDIF.
 
 
 
关系
 
        SELECT partner2 reltyp
          INTO (f_part-low , f_part-high)
          FROM but050
          WHERE partner1 = partner1 AND reltyp = reltype-low .
          f_part-sign = 'I' .
          f_part-option = 'EQ' .
          APPEND f_part .
          CLEAR: f_part .
        ENDSELECT .
 
      IF sign_t = 'X' .         " 批量维护合作伙伴关系--T
        CALL FUNCTION 'BURS_RELATION_MAINTAIN_DI'
          EXPORTING
            iv_aktyp    = '01'
            iv_partner1 = f_part-low
            iv_partner2 = partner2
            iv_date_to  = '99991231'
            iv_reltyp   = rltype.
      ELSEIF sign_f = 'X' .    " 批量维护合作伙伴关系--F
        CALL FUNCTION 'BURS_RELATION_MAINTAIN_DI'
          EXPORTING
            iv_aktyp    = '01'
            iv_partner1 = partner2
            iv_partner2 = f_part-low
            iv_date_to  = '99991231'
            iv_reltyp   = rltype.
阅读(1150) | 评论(0) | 转发(0) |
0

上一篇:report alv

下一篇:sap crm bp II

给主人留下些什么吧!~~