CRM BP函数
REPORT ZCRM_BP_TEST.
"""""""""""""""""""""""""""""""""""""CREATE BP***********************************
DATA:GW_HEAD TYPE BAPIBUS1006_HEAD,
GW_DATA TYPE BAPIBUS1006_CENTRAL,
GW_PERSON TYPE BAPIBUS1006_CENTRAL_PERSON,
GW_ORGAN TYPE BAPIBUS1006_CENTRAL_ORGAN,
GW_GROUP TYPE BAPIBUS1006_CENTRAL_GROUP,
GW_ADDR TYPE BAPIBUS1006_ADDRESS,
GT_ADTEL TYPE TABLE OF BAPIADTEL,
GW_ADTEL LIKE LINE OF GT_ADTEL,
GT_ADSMTP TYPE TABLE OF BAPIADSMTP,
GW_ADSMTP LIKE LINE OF GT_ADSMTP,
GT_RETURN TYPE TABLE OF BAPIRET2,
GW_RETURN LIKE LINE OF GT_RETURN,
GV_PARTNER TYPE BU_PARTNER. "person
GW_HEAD-PARTN_CAT = ''.
GW_HEAD-PARTN_GRP = 'Z021'. GW_PERSON-FIRSTNAME = 'FIRSTNAME'.
GW_PERSON-LASTNAME = 'LASTNAME'.
GW_PERSON-SEX = ''." ''Unknown,1 Female,2 Male GW_ADDR-STANDARDADDRESS = 'X'.
GW_ADDR-CITY = '滁州'.
GW_ADDR-DISTRICT = '定远'.
GW_ADDR-POSTL_COD1 = ''.
GW_ADDR-STREET = '严桥'.
GW_ADDR-STR_SUPPL1 = '官东'.
GW_ADDR-COUNTRY = 'CN'.
GW_ADDR-REGION = ''. GW_ADTEL-COUNTRY = 'CN'.
GW_ADTEL-STD_NO = 'X'.
GW_ADTEL-TELEPHONE = ''.
GW_ADTEL-R_3_USER = ''."1 Landline Telephones,3 Mobile Telephone
APPEND GW_ADTEL TO GT_ADTEL.
GW_ADTEL-COUNTRY = 'CN'.
GW_ADTEL-STD_NO = 'X'.
GW_ADTEL-TELEPHONE = ''.
GW_ADTEL-EXTENSION = ''.
GW_ADTEL-R_3_USER = ''."1 Landline Telephones,3 Mobile Telephone
APPEND GW_ADTEL TO GT_ADTEL. GW_ADSMTP-STD_NO = 'X'.
GW_ADSMTP-E_MAIL = 'WWWLIYUANANHUI@126.COM'.
APPEND GW_ADSMTP TO GT_ADSMTP. "创建BP
*CALL FUNCTION 'BUPA_CREATE_FROM_DATA'
* EXPORTING
** IV_PARTNER =
** IV_PARTNER_GUID =
* IV_CATEGORY = GW_HEAD-PARTN_CAT "BU_TYPE 1 = Person,2 = Organization ,3= Group
* IV_GROUP = GW_HEAD-PARTN_GRP
* IS_DATA = GW_DATA
* IS_DATA_PERSON = GW_PERSON
** IS_DATA_ORGAN =
** IS_DATA_GROUP =
* IS_ADDRESS = GW_ADDR
** IV_TESTRUN = ' '
** IV_DUPLICATE_MESSAGE_TYPE =
** IV_ACCEPT_ERROR = ' '
** IV_X_SAVE = 'X'
** IV_CONSIDER_CONSNUMBER_FOR_INS = ' '
** IV_CHECK_ADDRESS = 'X'
* IMPORTING
* EV_PARTNER = GV_PARTNER
** EV_PARTNER_GUID =
** EV_ADDRNUMBER =
** EV_ADDRGUID =
* TABLES
* IT_ADTEL = GT_ADTEL
** IT_ADFAX =
** IT_ADTTX =
** IT_ADTLX =
* IT_ADSMTP = GT_ADSMTP
** IT_ADRML =
** IT_ADX400 =
** IT_ADRFC =
** IT_ADPRT =
** IT_ADSSF =
** IT_ADURI =
** IT_ADPAG =
** IT_ADREM =
** IT_ADCOMREM =
** IT_ADCOMUSE =
** IT_ADTEL_ADDR_IND =
** IT_ADFAX_ADDR_IND =
** IT_ADTTX_ADDR_IND =
** IT_ADTLX_ADDR_IND =
** IT_ADSMTP_ADDR_IND =
** IT_ADRML_ADDR_IND =
** IT_ADX400_ADDR_IND =
** IT_ADRFC_ADDR_IND =
** IT_ADPRT_ADDR_IND =
** IT_ADSSF_ADDR_IND =
** IT_ADURI_ADDR_IND =
** IT_ADPAG_ADDR_IND =
** IT_ADCOMREM_ADDR_IND =
** IT_ADCOMUSE_ADDR_IND =
* ET_RETURN = GT_RETURN
** ET_ADDR_DUPLICATES =
* .
*READ TABLE GT_RETURN INTO GW_RETURN WITH KEY TYPE = 'E'.
*IF SY-SUBRC = 0.
* CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
* WRITE GW_RETURN-MESSAGE.
*ELSE.
* CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT = 'X'.
* WRITE GV_PARTNER.
*ENDIF.
"***************************ASSIGN ROLE TO BP
REFRESH:GT_RETURN.
GV_PARTNER = ''.
*CALL FUNCTION 'BUPA_ROLE_ADD_2'
* EXPORTING
* IV_PARTNER = GV_PARTNER
** IV_PARTNER_GUID =
** IV_PARTNERROLECATEGORY =
** IV_X_ALL_PARTNERROLES =
* IV_PARTNERROLE = 'CRM000'
** IV_DIFFTYPEVALUE =
** IV_VALIDFROM =
** IV_VALIDTO = '99991231'
** IV_X_SAVE = 'X'
** IV_CREATE_CP =
* TABLES
* ET_RETURN = GT_RETURN.
*READ TABLE GT_RETURN INTO GW_RETURN WITH KEY TYPE = 'E'.
*IF SY-SUBRC = 0.
* CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
* WRITE GW_RETURN-MESSAGE.
*ELSE.
* CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT = 'X'.
* WRITE GV_PARTNER.
*ENDIF.
"""""""""""""""""""""""""""""""ADD ID
*DATA:GW_IDENTIFICATION TYPE BAPIBUS1006_IDENTIFICATION.
*GW_IDENTIFICATION-IDINSTITUTE = '定远县公安局'.
*GW_IDENTIFICATION-IDENTRYDATE = '20160101'.
*GW_IDENTIFICATION-IDVALIDFROMDATE = '20160101'.
*GW_IDENTIFICATION-IDVALIDTODATE = '20260101'.
*GW_IDENTIFICATION-COUNTRY = 'CN'.
*GW_IDENTIFICATION-REGION = '110'.
*CALL FUNCTION 'BUPA_IDENTIFICATION_ADD'
* EXPORTING
* IV_PARTNER = GV_PARTNER
** IV_PARTNER_GUID =
** IV_IDENTIFICATIONCATEGORY = 'FS0001' "ID
* IV_IDENTIFICATIONNUMBER = '3411251991XXXXXXXX'
* IS_IDENTIFICATION = GW_IDENTIFICATION
** IV_X_SAVE = 'X'
* IV_IDENTIFICATIONTYPE = 'FS0001'
* TABLES
* ET_RETURN = GT_RETURN.
*READ TABLE GT_RETURN INTO GW_RETURN WITH KEY TYPE = 'E'.
*IF SY-SUBRC = 0.
* CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
* WRITE GW_RETURN-MESSAGE.
*ELSE.
* CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT = 'X'.
* WRITE GV_PARTNER.
*ENDIF. DATA:GT_DAT TYPE TABLE OF BUS_TB071_KEY,
GW_DAT LIKE LINE OF GT_DAT,
GV_GUID TYPE BU_PARTNER_GUID,
GV_ERROR TYPE CHAR01.
SELECT SINGLE PARTNER_GUID INTO GV_GUID FROM BUT000 WHERE PARTNER = GV_PARTNER.
GW_DAT-TAX_CTY = 'CN'.
*GW_DAT-TAX_REG = '110'.
GW_DAT-TAX_TYPE = 'MWST'.
GW_DAT-TAX_GROUP = 'FULL'.
APPEND GW_DAT TO GT_DAT.
CALL FUNCTION 'BUTX_FRG0010_CREATE'
EXPORTING
IV_PARTNER_GUID = GV_GUID
* IV_X_SAVE = 'X'
IMPORTING
ET_RETURN = GT_RETURN
EV_ERROR = GV_ERROR
TABLES
IT_DATA = GT_DAT.
READ TABLE GT_RETURN INTO GW_RETURN WITH KEY TYPE = 'E'.
IF SY-SUBRC = .
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
WRITE GW_RETURN-MESSAGE.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
WRITE GV_PARTNER.
ENDIF.
修改地址相关信息:
BAPI_BUPA_ADDRESS_CHANGE
BUBA_4包
CRM BP函数的更多相关文章
- CRM BP SEARCH 优化
出于方便的目的,这边将BU_GROUP,SALE_ORG加到了BP搜索里面,因为CRM项目推广了很多国家,每个国家一个SALE ORG,而标准的BP HEADER ADV SEARCH里竟然没有BU_ ...
- FG函数模块
ALDB: ABAP/4上的逻辑数据库 选择屏幕的修改更新 BUBA_4: ...
- Dynamics CRM 在报表中获取当前登陆用户的guid
<span style="font-size:18px;">CRM提供函数,只需在报表中调用即可.</span> <pre class="s ...
- Django的一些操作与视图函数
一 . Django的安装 pip install django==1.14.6 # 后面的数字是django的版本 二 . 通过命令行(cmd)来创建Django项目 1. 切换到保存项目的文件夹 ...
- Django之crm
crm注册 crm注册Form from django import forms from crm import models from django.core.exceptions import V ...
- 认识WinDbg
WinDbg学习笔记(一)--认识WinDbg 一.前言 本人学习WinDbg已经有好几天了,虽说技术掌握的还不太熟练,不过也总算是入门了在学习WinDbg的过程中,觉得WinDbg真的比Oll ...
- 三维计算机视觉 —— 中层次视觉 —— RCNN Family
RCNN是从图像中检测物体位置的方法,严格来讲不属于三维计算机视觉.但是这种方法却又非常非常重要,对三维物体的检测非常有启发,所以在这里做个总结. 1.RCNN - the original idea ...
- Unreal Engine 4 反射机制的实现
转自:http://blog.csdn.net/noahzuo/article/details/51482255 反射机制 反射机制指的是程序可以在运行期间进行检测和修改自己状态的能力. UE4引擎使 ...
- PCL —— RCNN Family 中层次点云处理
博客转载自:http://www.cnblogs.com/ironstark/p/6046411.html RCNN是从图像中检测物体位置的方法,严格来讲不属于三维计算机视觉.但是这种方法却又非常非常 ...
随机推荐
- 【java】字符串截取
String a = 'abcdef';String a = a.substring(0,1); a = 'a'; substring(int beginIndex, int endIndex) be ...
- 出现 sudo: unable to resolve host XXX 信息解决办法
Ubuntu环境, 每次执行sudo 就出现这个警告讯息:sudo: unable to resolve host XXX虽然sudo 还是可以正常执行,是机器在反解上的问题, 所以就直接从/etc ...
- Pandas | 20 级联
Pandas提供了各种工具(功能),可以轻松地将Series,DataFrame和Panel对象组合在一起. pd.concat(objs,axis=0,join='outer',join_axes= ...
- clojure 环境搭建
以下是clojure 基础环境搭建的几种方式 mac brew install clojure linux curl -O https://download.clojure.org/install/l ...
- 第02组Beta冲刺(2/4)
队名:十一个憨批 组长博客 作业博客 组长黄智 过去两天完成的任务:了解整个游戏的流程 GitHub签入记录 接下来的计划:继续完成游戏 还剩下哪些任务:完成游戏 燃尽图 遇到的困难:没有美术比较好的 ...
- 一元n次方程为什么至多有n个实根
任意一个n次多项式都可以分解成n个一次多项式的乘积.例如,对于三次多项式来说,那就可以分成三个一次式的乘积,也就是说,三次方程最多有三个根. 需要注意的是,最少的话可能一个实根都没有,如\(f(x)= ...
- Java 抽象类 抽象方法 接口
#抽象类 在面向对象的概念中,所有的对象都是通过类来描绘的,但是反过来,并不是所有的类都是用来描绘对象的,如果一个类中没有包含足够的信息来描绘一个具体的对象,这样的类就是抽象类. 抽象类除了不能实例化 ...
- IPython 安装
从 python 第三方库列表下载安装包 https://www.lfd.uci.edu/~gohlke/pythonlibs/ 然后使用 pip 进行安装 软件会自动安装到 python 安装路径的 ...
- 学习spring源码-可参考的资料
剑指Spring源码(二) https://www.cnblogs.com/codebear/p/10374261.html 使用idea和gradle编译spring5源码https://blog. ...
- SpringBoot+Mysql 无法保存emoj表情?
尤记得很久以前,想存 emoj 表情到 mysql 中,需要额外的将 emoj 表情转码之后保存,每次读取时,再解码还原成一下:每次这种 sb 的操作,真心感觉心塞,那么有没有办法直接存呢? mysq ...