CRM创建BP(END USER)
FUNCTION ZCRM_BP_CRT.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(PHONE) TYPE BAPIADTEL-TELEPHONE OPTIONAL
*" REFERENCE(MOBIL) TYPE BAPIADTEL-TELEPHONE OPTIONAL
*" REFERENCE(FIRSTNAME) TYPE BAPIBUS1006_CENTRAL_PERSON-FIRSTNAME
*" OPTIONAL
*" REFERENCE(LASTNAME) TYPE BAPIBUS1006_CENTRAL_PERSON-LASTNAME
*" OPTIONAL
*" REFERENCE(CITY) TYPE BAPIBUS1006_ADDRESS-CITY OPTIONAL
*" REFERENCE(COUNTRY) TYPE BAPIBUS1006_ADDRESS-COUNTRY OPTIONAL
*" REFERENCE(DISTRICT) TYPE AD_CITY2 OPTIONAL
*" REFERENCE(STREET) TYPE BAPIBUS1006_ADDRESS-STREET OPTIONAL
*" REFERENCE(HOUSE_NO) TYPE BAPIBUS1006_ADDRESS-HOUSE_NO OPTIONAL
*" REFERENCE(POSTCODE) TYPE BAPIBUS1006_ADDRESS-POSTL_COD1
*" OPTIONAL
*" REFERENCE(REGION) TYPE BAPIBUS1006_ADDRESS-REGION OPTIONAL
*" REFERENCE(TEL_EXTENS) TYPE AD_TLXTNS OPTIONAL
*" REFERENCE(FAX_NUMBER) TYPE AD_FXNMBR OPTIONAL
*" REFERENCE(FAX_EXTENS) TYPE AD_FXXTNS OPTIONAL
*" REFERENCE(DEFLT_COMM) TYPE AD_COMM OPTIONAL
*" REFERENCE(TITLE_LET) TYPE BU_TITLE_LET OPTIONAL
*" REFERENCE(SMTP_ADDR) TYPE AD_SMTPADR OPTIONAL
*" REFERENCE(BU_TYPE) TYPE BU_TYPE DEFAULT '1'
*" REFERENCE(TITLE) TYPE AD_TITLE OPTIONAL
*" REFERENCE(BU_SORT1) TYPE BU_SORT1 OPTIONAL
*" REFERENCE(TIME_ZONE) TYPE AD_TZONE OPTIONAL
*" REFERENCE(IV_ZA_FLAG) TYPE ZCORDER_GENERAL-ZA_FLAG OPTIONAL
*" REFERENCE(IV_LAND) TYPE LAND1 OPTIONAL
*" REFERENCE(IV_STR_SUPPL1) TYPE AD_STRSPP1 OPTIONAL
*" REFERENCE(IV_STR_SUPPL2) TYPE AD_STRSPP2 OPTIONAL
*" REFERENCE(IV_ZZBUILDING_TYPE) TYPE ZBUILDING_TYPE_E OPTIONAL
*" REFERENCE(IV_ZZMKT_USAGE) TYPE ZMKT_USAGE_E OPTIONAL
*" REFERENCE(IV_FLOOR) TYPE AD_FLOOR OPTIONAL
*" REFERENCE(IV_ZZACCESS_CODE) TYPE ZACCESS_CODE_E OPTIONAL
*" REFERENCE(IV_NAMEORG1) TYPE BU_NAMEOR1 OPTIONAL
*" REFERENCE(SALES_ORG) TYPE CRMT_SALES_ORG OPTIONAL
*" EXPORTING
*" REFERENCE(BP_NUMBER) TYPE BU_PARTNER
*" TABLES
*" RETURN STRUCTURE BAPIRET2
*"---------------------------------------------------------------------- TYPES:BEGIN OF TY_BP_DATA,
PARTNER TYPE BUT000-PARTNER, "0.
SEQNO TYPE NUM10,
PARTNERCATEGORY TYPE BAPIBUS1006_HEAD-PARTN_CAT, "-1
PARTNERROLE TYPE BAPIBUS1006_BPROLES-PARTNERROLE, "角色
PARTN_GRP TYPE BAPIBUS1006_HEAD-PARTN_GRP,
TITLE_KEY TYPE BAPIBUS1006_CENTRAL-TITLE_KEY,
FIRSTNAME TYPE BAPIBUS1006_CENTRAL_PERSON-FIRSTNAME,
LASTNAME TYPE BAPIBUS1006_CENTRAL_PERSON-LASTNAME,
CITY TYPE BAPIBUS1006_ADDRESS-CITY,
COUNTRY TYPE BAPIBUS1006_ADDRESS-COUNTRY, " 4.注册地址-国家
REGION TYPE BAPIBUS1006_ADDRESS-REGION, " 5.注册地址-地区
TELEPHONE TYPE BAPIADTEL-TELEPHONE, "15.电话
MOBIL TYPE BAPIADTEL-TELEPHONE,
E_MAIL TYPE BAPIADSMTP-E_MAIL,
NAME1 TYPE BAPIBUS1006_CENTRAL_ORGAN-NAME1,
NAME2 TYPE BAPIBUS1006_CENTRAL_ORGAN-NAME2,
STREET TYPE BAPIBUS1006_ADDRESS-STREET,
LANGU TYPE BAPIBUS1006_ADDRESS-LANGU,
SALES_ORGANIZATION TYPE BAPIBUS1006_SALES_AREA-SALES_ORGANIZATION, " 19.销售组织标识
DISTRIBUTION_CHANNEL TYPE BAPIBUS1006_SALES_AREA-DISTRIBUTION_CHANNEL, " 20.分销渠道
DIVISION TYPE BAPIBUS1006_SALES_AREA-DIVISION, " 21.部门
SALES_OFFICE TYPE BAPIBUS1006140_ORG-SALES_OFFICE, " 22.销售部门
SALES_GROUP TYPE BAPIBUS1006140_ORG-SALES_GROUP, " 23.销售组
CUST_PRIC_PROC TYPE BAPIBUS1006030_PRICING-CUST_PRIC_PROC, "客户定价程序
END OF TY_BP_DATA. DATA:T_BP_DATA TYPE TABLE OF TY_BP_DATA,
W_BP_DATA LIKE LINE OF T_BP_DATA.
DATA:
LT_BAPIRET2 TYPE TABLE OF BAPIRET2,
LV_PARTNER_GUID TYPE BU_PARTNER_GUID,
LS_EEWB TYPE BUS000_EEW,
LS_EEWB_X TYPE BUS000_EEW_X.
DATA LW_CENTRALDATA TYPE BAPIBUS1006_CENTRAL.
DATA LW_CENTRALDATAPERSON TYPE BAPIBUS1006_CENTRAL_PERSON.
DATA LW_ADDRESSDATA TYPE BAPIBUS1006_ADDRESS.
DATA LT_TELEFONDATA TYPE STANDARD TABLE OF BAPIADTEL WITH HEADER LINE.
DATA LT_FAXDATA TYPE STANDARD TABLE OF BAPIADFAX WITH HEADER LINE.
DATA LT_E_MAILDATA TYPE STANDARD TABLE OF BAPIADSMTP WITH HEADER LINE.
DATA LT_BUSINESSPARTNERROLE TYPE STANDARD TABLE OF BAPIBUS1006_BPROLES WITH HEADER LINE.
DATA LT_RETURN TYPE STANDARD TABLE OF BAPIRET2 WITH HEADER LINE.
DATA: L_FAIL TYPE C. DATA LW_CENTRALDATAORGANIZATION TYPE BAPIBUS1006_CENTRAL_ORGAN.
DATA LW_SALES_AREA TYPE BAPIBUS1006_SALES_AREA.
DATA LW_SALES_ORG TYPE BAPIBUS1006140_ORG.
DATA LW_SALES_CLASS TYPE BAPIBUS1006040_SALESCLASS.
DATA LW_SALES_CLASSX TYPE BAPIBUS1006040_SALESCLASSX.
DATA LW_SALES_BILL TYPE BAPIBUS1006030_PRICING.
DATA LW_SALES_SHIPPING TYPE BAPIBUS1006020_SHIPPING. W_BP_DATA-FIRSTNAME = FIRSTNAME.
W_BP_DATA-LASTNAME = LASTNAME.
W_BP_DATA-TELEPHONE = PHONE.
W_BP_DATA-MOBIL = MOBIL.
W_BP_DATA-CITY = CITY.
W_BP_DATA-COUNTRY = COUNTRY. LW_CENTRALDATA-TITLELETTER = TITLE_LET. LW_CENTRALDATA-TITLE_KEY = TITLE."add by dq-yuw 20170920 IF BU_TYPE = ''.
LW_CENTRALDATAPERSON-LASTNAME = W_BP_DATA-LASTNAME.
LW_CENTRALDATAPERSON-FIRSTNAME = W_BP_DATA-FIRSTNAME.
LW_CENTRALDATAPERSON-CORRESPONDLANGUAGE = 'E'.
* lw_centraldata-title_key = title."change by dq-yuw:这里应该是个BUG,创建公司客户也可以有tittle,这里把他放到上面去
ELSEIF BU_TYPE = ''.
"add by dq-yuw 之前本来就错的吧,写反了应该,法国和日本先给他改过来
IF COUNTRY EQ 'JP'"日本创建客户时name org1就是页面上lastname字段
OR COUNTRY EQ 'FR'."
LW_CENTRALDATAORGANIZATION-NAME1 = W_BP_DATA-LASTNAME.
LW_CENTRALDATAORGANIZATION-NAME2 = W_BP_DATA-FIRSTNAME.
ELSE.
LW_CENTRALDATAORGANIZATION-NAME1 = W_BP_DATA-FIRSTNAME.
LW_CENTRALDATAORGANIZATION-NAME2 = W_BP_DATA-LASTNAME.
ENDIF. "法国创建公司客户的时候用页面上的company name
IF COUNTRY EQ 'FR' OR ZCL_CRM_BUFFER=>GV_UI_LOGIN_ORG EQ 'O 50000297'."法国
* CLEAR: lw_centraldataorganization-name1,lw_centraldataorganization-name2. 20171019 需求 取消该逻辑
LW_CENTRALDATAORGANIZATION-NAME1 = IV_NAMEORG1.
LW_CENTRALDATAORGANIZATION-NAME3 = W_BP_DATA-LASTNAME."20171019 需求 Last Name 借用 Org3 字段
ENDIF. LW_ADDRESSDATA-LANGU = 'E'.
LW_CENTRALDATA-SEARCHTERM1 = BU_SORT1.
ENDIF. LW_ADDRESSDATA-COUNTRY = W_BP_DATA-COUNTRY.
LW_ADDRESSDATA-CITY = W_BP_DATA-CITY.
LW_ADDRESSDATA-STREET = STREET.
LW_ADDRESSDATA-STR_SUPPL1 = IV_STR_SUPPL1."add by dq-yuw for japan
LW_ADDRESSDATA-STR_SUPPL2 = IV_STR_SUPPL2."add by dq-yuw for FRANCE
LW_ADDRESSDATA-DISTRICT = DISTRICT.
LW_ADDRESSDATA-HOUSE_NO = HOUSE_NO.
LW_ADDRESSDATA-POSTL_COD1 = POSTCODE.
LW_ADDRESSDATA-REGION = REGION.
LW_ADDRESSDATA-FLOOR = IV_FLOOR."20170718 Add Chenguoguang
LW_ADDRESSDATA-COMM_TYPE = DEFLT_COMM.
LW_ADDRESSDATA-TIME_ZONE = TIME_ZONE. IF W_BP_DATA-TELEPHONE IS NOT INITIAL.
CLEAR LT_TELEFONDATA.
LT_TELEFONDATA-COUNTRY = W_BP_DATA-COUNTRY.
LT_TELEFONDATA-TELEPHONE = W_BP_DATA-TELEPHONE.
LT_TELEFONDATA-R_3_USER = ''.
LT_TELEFONDATA-EXTENSION = TEL_EXTENS.
APPEND LT_TELEFONDATA.
ENDIF. IF W_BP_DATA-MOBIL IS NOT INITIAL.
CLEAR LT_TELEFONDATA.
LT_TELEFONDATA-COUNTRY = W_BP_DATA-COUNTRY.
LT_TELEFONDATA-TELEPHONE = W_BP_DATA-MOBIL.
LT_TELEFONDATA-R_3_USER = ''.
APPEND LT_TELEFONDATA.
ENDIF. IF FAX_NUMBER IS NOT INITIAL. LT_FAXDATA-FAX = FAX_NUMBER.
LT_FAXDATA-EXTENSION = FAX_EXTENS.
APPEND LT_FAXDATA.
ENDIF. IF SMTP_ADDR IS NOT INITIAL.
LT_E_MAILDATA-E_MAIL = SMTP_ADDR.
APPEND LT_E_MAILDATA.
ENDIF. *默认为客户
LW_SALES_CLASS-IS_CUSTOMER = 'X'.
LW_SALES_CLASSX-IS_CUSTOMER = 'X'. *装运
IF COUNTRY = 'ES'.
LW_SALES_SHIPPING-SHIPPING_COND = ''.
ELSE.
LW_SALES_SHIPPING-SHIPPING_COND = ''.
ENDIF.
LW_SALES_SHIPPING-DLV_PRIORITY = . *根据国家信息在表ZBP_SALES里取出相关信息
DATA: IT_BP_SALES TYPE STANDARD TABLE OF ZBP_SALES,
WA_BP_SALES TYPE ZBP_SALES. SELECT SINGLE *
FROM ZBP_SALES
INTO WA_BP_SALES
WHERE COUNTRY = COUNTRY.
* ENDIF.
IF sales_org IS NOT INITIAL."add by ly 20180803
SELECT SINGLE *
FROM ZBP_SALES
INTO WA_BP_SALES
WHERE COUNTRY = COUNTRY
AND SALES_ORG = SALES_ORG.
ENDIF.
"add by dq-yuw request by zhangchi
"集中建单平台创建客户时,根据客户地址中的国家 = ZBP_SALES-COUNTRY & 当前登录用户的销售组织 = ZBP_SALES-SALES_ORG,来查找ZBP_SALES表中的数据,
"以确定创建客户的BP分组和销售组织等数据。
IF ZCL_CRM_ATTRIBUTES=>GV_WEB_UI_LOGON = ABAP_TRUE..
DATA LV_SALES_ORG TYPE CRMT_SALES_ORG. CALL FUNCTION 'Z_GET_SALESORG_BY_USER'
EXPORTING
IV_USER = SY-UNAME
IMPORTING
EV_SALES_ORG = LV_SALES_ORG
* EV_COUNTRY =
* EV_HQ =
.
IF LV_SALES_ORG <> 'O 50000192' AND LV_SALES_ORG <> 'O 50000194'.
SELECT SINGLE *
FROM ZBP_SALES
INTO WA_BP_SALES
WHERE COUNTRY = COUNTRY
AND SALES_ORG = LV_SALES_ORG.
ENDIF.
ENDIF.
* 销售视图
LW_SALES_AREA-SALES_ORGANIZATION = WA_BP_SALES-SALES_ORG.
LW_SALES_AREA-DISTRIBUTION_CHANNEL = WA_BP_SALES-CHANNEL.
* lw_sales_area-division = wa_bp_sales-division.
LW_SALES_ORG-SALES_OFFICE = WA_BP_SALES-SALES_OFFICE.
* lw_sales_org-sales_group = wa_bp_sales-sales_group. * 定价程序
LW_SALES_BILL-PRICE_GROUP = WA_BP_SALES-PRICE_GROUP.
LW_SALES_BILL-CURRENCY = WA_BP_SALES-CURRENCY.
LW_SALES_BILL-CUST_PRIC_PROC = 'X'. CLEAR:L_FAIL.
CALL FUNCTION 'BAPI_BUPA_CREATE_FROM_DATA'
EXPORTING
PARTNERCATEGORY = BU_TYPE
PARTNERGROUP = WA_BP_SALES-BU_GROUP
* partnergroup = w_bp_data-partn_grp
CENTRALDATAORGANIZATION = LW_CENTRALDATAORGANIZATION
CENTRALDATA = LW_CENTRALDATA
CENTRALDATAPERSON = LW_CENTRALDATAPERSON
ADDRESSDATA = LW_ADDRESSDATA
IMPORTING
BUSINESSPARTNER = W_BP_DATA-PARTNER
TABLES
TELEFONDATA = LT_TELEFONDATA
FAXDATA = LT_FAXDATA
E_MAILDATA = LT_E_MAILDATA
RETURN = LT_RETURN. LOOP AT LT_RETURN WHERE TYPE = 'A' OR TYPE = 'E'.
L_FAIL = 'X'.
APPEND LT_RETURN TO RETURN[].
CLEAR LT_RETURN.
ENDLOOP.
IF L_FAIL = 'X'.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
ENDIF.
CHECK L_FAIL IS INITIAL.
CHECK W_BP_DATA-PARTNER IS NOT INITIAL. BP_NUMBER = W_BP_DATA-PARTNER. *返回创建好的bp号码
CLEAR LT_RETURN.
LT_RETURN-TYPE = 'S'.
LT_RETURN-MESSAGE = W_BP_DATA-PARTNER.
APPEND LT_RETURN TO RETURN[]. *角色
CALL FUNCTION 'BAPI_BUPA_ROLE_ADD_2'
EXPORTING
BUSINESSPARTNER = W_BP_DATA-PARTNER
BUSINESSPARTNERROLE = 'CRM000'
VALIDFROMDATE = ''
VALIDUNTILDATE = ''
TABLES
RETURN = LT_RETURN. LOOP AT LT_RETURN WHERE TYPE = 'E' OR TYPE = 'A' .
L_FAIL = 'X'. ENDLOOP. IF L_FAIL = 'X'.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
ENDIF.
CHECK L_FAIL IS INITIAL.
*税分类
IF WA_BP_SALES-COUNTRY IS NOT INITIAL AND
WA_BP_SALES-TAX_TYPE IS NOT INITIAL AND
WA_BP_SALES-TAX_GROUP IS NOT INITIAL.
CLEAR L_FAIL.
DATA: L_TAXREGION TYPE BAPIBUS1006_TAX_CLASS-TAXREGION.
CALL FUNCTION 'BAPI_BUTX_FRG0010_ADD'
EXPORTING
BUSINESSPARTNER = W_BP_DATA-PARTNER
TAXCOUNTRY = WA_BP_SALES-COUNTRY
TAXREGION = L_TAXREGION
TAXTYPE = WA_BP_SALES-TAX_TYPE
DATA = WA_BP_SALES-TAX_GROUP
TABLES
RETURN = LT_RETURN.
ENDIF . LOOP AT LT_RETURN WHERE TYPE = 'E' OR TYPE = 'A' .
L_FAIL = 'X'. ENDLOOP. IF L_FAIL = 'X'.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
ENDIF. CLEAR L_FAIL. *销售范围
CALL FUNCTION 'BAPI_BUPA_FRG0010_ADD'
EXPORTING
BUSINESSPARTNER = W_BP_DATA-PARTNER
SALES_AREA = LW_SALES_AREA
* DATA =
TABLES
RETURN = LT_RETURN. LOOP AT LT_RETURN WHERE TYPE = 'E' OR TYPE = 'A' .
L_FAIL = 'X'.
APPEND LT_RETURN TO RETURN[].
CLEAR LT_RETURN.
ENDLOOP. IF L_FAIL = 'X'.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
ENDIF. CLEAR L_FAIL. *组织
CALL FUNCTION 'BAPI_BUPA_FRG0140_ADD'
EXPORTING
BUSINESSPARTNER = W_BP_DATA-PARTNER
SALES_AREA = LW_SALES_AREA
DATA = LW_SALES_ORG
* DATAX =
TABLES
RETURN = LT_RETURN. LOOP AT LT_RETURN WHERE TYPE = 'E' OR TYPE = 'A' .
L_FAIL = 'X'.
APPEND LT_RETURN TO RETURN[].
CLEAR LT_RETURN.
ENDLOOP. IF L_FAIL = 'X'.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK' . ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
ENDIF. CLEAR L_FAIL. *开票中的客户定价程序
CALL FUNCTION 'BAPI_BUPA_FRG0030_ADD'
EXPORTING
BUSINESSPARTNER = W_BP_DATA-PARTNER
SALES_AREA = LW_SALES_AREA
DATA = LW_SALES_BILL
TABLES
RETURN = LT_RETURN.
LOOP AT LT_RETURN WHERE TYPE = 'E' OR TYPE = 'A' .
L_FAIL = 'X'.
APPEND LT_RETURN TO RETURN[].
CLEAR LT_RETURN.
* WAIT UP TO '0.5' SECONDS.
ENDLOOP. IF L_FAIL = 'X'.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
ENDIF. CLEAR L_FAIL. CALL FUNCTION 'BAPI_BUPA_FRG0040_CREATE'
EXPORTING
BUSINESSPARTNER = W_BP_DATA-PARTNER
DATA = LW_SALES_CLASS
* datax = lw_sales_classx
TABLES
RETURN = LT_RETURN. LOOP AT LT_RETURN WHERE TYPE = 'E' OR TYPE = 'A' .
L_FAIL = 'X'.
APPEND LT_RETURN TO RETURN[].
CLEAR LT_RETURN.
* WAIT UP TO '0.5' SECONDS.
ENDLOOP. IF L_FAIL = 'X'.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
* CONTINUE.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
ENDIF. CLEAR L_FAIL. CALL FUNCTION 'BAPI_BUPA_FRG0020_ADD'
EXPORTING
BUSINESSPARTNER = W_BP_DATA-PARTNER
SALES_AREA = LW_SALES_AREA
DATA = LW_SALES_SHIPPING
* datax = lw_sales_classx
TABLES
RETURN = LT_RETURN. LOOP AT LT_RETURN WHERE TYPE = 'E' OR TYPE = 'A' .
L_FAIL = 'X'.
APPEND LT_RETURN TO RETURN[].
CLEAR LT_RETURN.
* WAIT UP TO '0.5' SECONDS.
ENDLOOP. IF L_FAIL = 'X'.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
* CONTINUE.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
ENDIF. DEFINE EEW.
IF & is NOT INITIAL.
& = &.
& = 'X'.
ENDIF.
END-OF-DEFINITION.
**&----增强字段(网点)
CLEAR:LS_EEWB_X,LS_EEWB.
SELECT SINGLE PARTNER_GUID
INTO LV_PARTNER_GUID
FROM BUT000
WHERE PARTNER = W_BP_DATA-PARTNER.
IF SY-SUBRC = .
LS_EEWB-PARTNR_GUID = LV_PARTNER_GUID.
EEW IV_ZZBUILDING_TYPE LS_EEWB-ZZBUILDING_TYPE LS_EEWB_X-ZZBUILDING_TYPE.
EEW IV_ZZMKT_USAGE LS_EEWB-ZZMKT_USAGE LS_EEWB_X-ZZMKT_USAGE.
EEW IV_ZZACCESS_CODE LS_EEWB-ZZACCESS_CODE LS_EEWB_X-ZZACCESS_CODE.
REFRESH:LT_RETURN, LT_BAPIRET2.
CALL FUNCTION 'BUPA_CENTRAL_CI_CHANGE'
EXPORTING
IS_BUS000_EEW = LS_EEWB
IS_BUS000_EEW_X = LS_EEWB_X
IMPORTING
ET_RETURN = LT_BAPIRET2.
APPEND LINES OF LT_BAPIRET2 TO LT_RETURN.
LOOP AT LT_RETURN WHERE TYPE = 'E' OR TYPE = 'A' .
L_FAIL = 'X'.
APPEND LT_RETURN TO RETURN[].
CLEAR LT_RETURN.
* WAIT UP TO '0.5' SECONDS.
ENDLOOP. IF L_FAIL = 'X'.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
* CONTINUE.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
ENDIF.
ENDIF. ENDFUNCTION.
CRM创建BP(END USER)的更多相关文章
- CRM创建物料FM2
这是在佛山好帮手时受启发而研究出来的,创建物料,带单位,类型组 经测试....算了,不说了,有什么限制自己测去...今天心情不好... FUNCTION ZLY_CREATE_PRODUCT_UNIT ...
- crm创建报告补充导航
报告导航实现动态交互体验报告. 通过使用各种类型的操作的,报告允许用户导航到特定的报告.Microsoft Dynamics CRM 记录或其它网站 动态钻取到 Microsoft Dynamics ...
- crm创建和编辑全局选项集
一个选项集就是可包含在一个实体中的某种类型的字段.它定义一组选项.当一个选项集显示在窗口中时,将使用下拉列表控件.当在 Advanced Find 中显示时,则使用选择列表控件.有时,开发者将选项集称 ...
- crm创建启用停用用户
public static readonly string entityName = "systemuser"; public Guid userId = Guid ...
- CRM创建物料FM1
这是在中联混凝土那边搞的.... method create_prd. data: lt_return type bapiret2_tab, ls_return like line o ...
- crm创建基于fetch自己的自定义报告
在解决方案资源管理器,右键点击"报表"目录.然后点击"增加了新的报告". 打开"报表向导". 在"欢迎来到报表向导"前, ...
- Pytorch自定义创建BP神经网络
class BPNet(nn.Module): def __init__(self, in_dim, n_hidden_1, n_hidden_2,\ n_hidden_3, n_hidden_4, ...
- SAP CRM 为用户创建业务合作伙伴并分配到组织单位
想要在SAP CRM的前台完成一些操作,需要登录的用户在系统中存在对应的业务合作伙伴才可以,某些情况下,还需要被分配到正确的公司.部门.职位.下面是相关的操作步骤. 本文假定读者已经拥有一个开发帐号. ...
- CRM BP函数
REPORT ZCRM_BP_TEST. """""""""""""& ...
随机推荐
- LR12集合点设置和多个负载生成器策略
今天给大家分享几个有关LR12的Controller使用过程中的几个常用问题: 一,脚本中添加集合点函数---lr_rendezvous 1,在被测接口事物函数之前加入集合点函数--lr_rendez ...
- C++ this指针的详解
C++中this指针的用法详解 转自:http://blog.chinaunix.net/uid-21411227-id-1826942.html 1. this指针的用处: 一个对象的this指 ...
- zigbee 安全通信加密链接密钥
---恢复内容开始--- #define KEY_TYPE_TC_MASTER 0 // Trust Center Master Key信任中心主密钥#define KEY_TYPE_ ...
- Django 中 form 介绍
目录 Form介绍 我们之前在HTML页面中利用form表单向后端提交数据时,都会写一些获取用户输入的标签并且用form标签把它们包起来. 与此同时我们在好多场景下都需要对用户的输入做校验,比如校验用 ...
- Python中 sys.argv[]的用法简明解释
sys.argv[]就是一个从程序外部获取参数的桥梁,这个“外部”很关键.因为我们从外部取得的参数可以是多个,所以获得的是一个列表(list),也就是说sys.argv其实可以看作是一个列表,所以才能 ...
- 其他shell
dash shell Debian的dash shell的历史很有趣.它是ash shell的直系后代,而ash shell则是Unix系统上原来 的Bourne shell的简化版本(参见第1章). ...
- Pdf Convert Image 的解决方案
brew uninstall ghostscript brew install ghostscript gs -dNOPAUSE -sDEVICE=jpeg -r150 -sOutputFile=./ ...
- 细数Linux的文件权限
普通权限 普通权限使用ls -l查看,最前面显示的即是,如: # ls -l .txt -rw-r--r-- 1 root root 8338 7月 19 20:27 1.txt 权限介绍: -/d/ ...
- server.xml引入子文件配置(tomcat虚拟主机)
在配置tomcat虚拟主机时候,如何每一个虚拟主机写成单独文件,server.xml包含这些子文件? 如以下<OneinStack>中,添加JAVA环境虚拟主机后tomcat配置文件详情: ...
- MyBatis-plus使用
https://blog.csdn.net/qq_32867467/article/details/82944674 官网: https://mp.baomidou.com/guide/optimis ...