CRM-BP相关FUNCTION
获取BP的地址信息:BUPA_ADDRESS_GET_DETAIL
修改BP的信息:CRM_WAP_BP_CHANGE
BUTO50存放2个BP之间的关系
获取BP的角色 BAPI_BUPA_ROLES_GET
BAPI_BUPA_ROLES_GET_2
增加BP的角色(roles)
*&———————————————————————*
*& Report ZCXM_BP_ADD_ROLES
*&
*&———————————————————————*
*&
*&
*&———————————————————————*
REPORT zcxm_bp_add_roles.
DATA : p_catlog TYPE bapibus1006_bproles-partnerrolecategory,
p_roles TYPE bapibus1006_bproles-partnerrole.
DATA : return LIKE TABLE OF bapiret2 .
DATA : return1 LIKE bapiret2.
p_catlog = ‘CRM005′.
p_roles = ‘CRM005′ .
CALL FUNCTION ‘BAPI_BUPA_ROLE_ADD_2′
EXPORTING
businesspartner = ‘0000004439′
businesspartnerrolecategory = p_catlog
businesspartnerrole = p_roles
TABLES
return = return.
CALL FUNCTION ‘BAPI_TRANSACTION_COMMIT’
EXPORTING
wait = ‘X’
IMPORTING
return = return1.
删除BP的ROLES BAPI_BUPA_ROLE_REMOVE
*&———————————————————————*
*& Report ZCXM_BP_REMOVE_ROLES
*&
*&———————————————————————*
*&
*&
*&———————————————————————*
REPORT ZCXM_BP_REMOVE_ROLES.
DATA : return LIKE TABLE OF bapiret2 .
DATA : return1 LIKE bapiret2.
CALL FUNCTION ‘BAPI_BUPA_ROLE_REMOVE’
EXPORTING
BUSINESSPARTNER = ‘0000004438′
BUSINESSPARTNERROLECATEGORY = ‘BUP005′
* ALL_BUSINESSPARTNERROLES = ‘ ‘
BUSINESSPARTNERROLE = ‘BUP005′
* DIFFERENTIATIONTYPEVALUE =
* ALL_DIFFERENTIATIONTYPEVALUES = ‘ ‘
TABLES
RETURN = return
.
CALL FUNCTION ‘BAPI_TRANSACTION_COMMIT’
EXPORTING
wait = ‘X’
IMPORTING
return = return1.
BP的关系获取 BAPI_BUPA_RELATIONSHIPS_GET
读取BP的市场属性列表 CRM_MKTBP_READ_ALL_TPL
分配市场属性给BP CRM_MKTBP_ASSIGN_ATTRIBUT
根据BP和市场属性ID获取属性值 CRM_MKTBP_READ_OW
通过INTERNET USER查找BP BUP_PARTNER_SEARCH_BY_IUSER
通过BP号获取INTERNET USER BUP_PARTNER_TO_USER_CONVERT
获取BP描述 BUP_PARTNER_DESCRIPTION_GET
通过INTERNET USERS搜索BP BUP_PARTNER_SEARCH_BY_IUSER
根据ROLES查找BP BUP_PARTNER_GET_BY_BPROLE
创建B2C的用户(SU05) BAPI_BPARTNER_CREATEPASSWORD
获取BP中银行细目 BUPA_BANK_DESCRIPTION_GET
通过BP号获取GUI BUP_PARTNER_GUID_CONVERT
通过BP号获取INTERNET USER BP_CENTRALPERSON_GET
通过BP GUI号获取BP号 BUPA_NUMBERS_GET
为BP创建INTERNET USER并建立关系
*&———————————————————————*
*& Report ZCXM_BPUS_USER_AND_CP_CREATE
*&
*&———————————————————————*
*&
*&
*&———————————————————————*
REPORT ZCXM_BPUS_USER_AND_CP_CREATE.
DATA :IS_ADDRESSDATA_BUPA TYPE BAPIBUS1006_ADDRESS,
IS_CENTRALDATA_BUPA TYPE BAPIBUS1006_CENTRAL.
DATA :
IS_REFERENCEUSER TYPE BAPIBNAME VALUE ‘REF_INTUSER’ .
PARAMETERS : IV_BP TYPE BAPIBUS1006_HEAD-BPARTNER ,
IS_ALIAS TYPE BAPIALIAS,
IS_UNAME TYPE BAPIBNAME ,
IS_PWD TYPE BAPIPWD.
CALL FUNCTION ‘BAPI_BUPA_ADDRESS_GETDETAIL’
EXPORTING
BUSINESSPARTNER = IV_BP
* ADDRESSGUID =
* VALID_DATE = SY-DATLO
IMPORTING
ADDRESSDATA = IS_ADDRESSDATA_BUPA
* TABLES
* BAPIADTEL =
* BAPIADFAX =
* BAPIADTTX =
* BAPIADTLX =
* BAPIADSMTP =
* BAPIADRML =
* BAPIADX400 =
* BAPIADRFC =
* BAPIADPRT =
* BAPIADSSF =
* BAPIADURI =
* BAPIADPAG =
* BAPIAD_REM =
* BAPICOMREM =
* ADDRESSUSAGE =
* BAPIADVERSORG =
* BAPIADVERSPERS =
* BAPIADUSE =
* RETURN =
.
CALL FUNCTION ‘BAPI_BUPA_CENTRAL_GETDETAIL’
EXPORTING
BUSINESSPARTNER = IV_BP
* VALID_DATE = SY-DATLO
IMPORTING
CENTRALDATA = IS_CENTRALDATA_BUPA
* CENTRALDATAPERSON =
* CENTRALDATAORGANIZATION =
* CENTRALDATAGROUP =
* CENTRALDATAVALIDITY =
* TABLES
* TELEFONDATANONADDRESS =
* FAXDATANONADDRESS =
* TELETEXDATANONADDRESS =
* TELEXDATANONADDRESS =
* E_MAILDATANONADDRESS =
* RMLADDRESSDATANONADDRESS =
* X400ADDRESSDATANONADDRESS =
* RFCADDRESSDATANONADDRESS =
* PRTADDRESSDATANONADDRESS =
* SSFADDRESSDATANONADDRESS =
* URIADDRESSDATANONADDRESS =
* PAGADDRESSDATANONADDRESS =
* COMMUNICATIONNOTESNONADDRESS =
* COMMUNICATIONUSAGENONADDRESS =
* RETURN =
.
CALL FUNCTION ‘COM_BPUS_USER_AND_CP_CREATE’
EXPORTING
IV_BUSINESSPARTNER = IV_BP
IS_ADDRESSDATA_BUPA = IS_ADDRESSDATA_BUPA
IS_CENTRALDATA_BUPA = IS_CENTRALDATA_BUPA
IV_BUPA_READ = ‘X’
IS_ALIAS = IS_ALIAS
IS_USERNAME = IS_UNAME
IS_PASSWORD = IS_PWD
IS_REFERENCEUSER = IS_REFERENCEUSER
* IV_USERLOCK = ‘ ‘
* IS_OPTIONS =
* IMPORTING
* ES_USERNAME =
* ES_PASSWORD =
* EV_PARTNGUID =
* TABLES
* IT_GROUPS =
* IT_ACTIVITYGROUPS =
* ET_RETURN =
* EXCEPTIONS
* INTERNETUSER_CREATE_ERROR = 1
* CENTRALPERSON_CREATE_ERROR = 2
* OTHERS = 3
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION ‘BAPI_TRANSACTION_COMMIT’
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
.
根据EMAIL地址搜索BP
* Get business partners for e-mail.
CALL FUNCTION ‘BAPI_BUPA_SEARCH’
EXPORTING
* TELEPHONE =
EMAIL = IV_E_MAIL
* ADDRESSDATA =
* CENTRALDATA =
* BUSINESSPARTNERROLE =
TABLES
SEARCHRESULT = LT_BP_ADDR
RETURN = LT_RET2.
获取DOMAIN值 FICO_DOMAIN_VALUES_GET
根据地址信息查找BP CRM_ICSS_ACCOUNT_CHECK