问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

SAP ABAP 使用cmd_ei_api=>maintain_bapi 在后台创建Customer Master的时候

发布网友 发布时间:2022-05-06 18:08

我来回答

2个回答

懂视网 时间:2022-05-06 22:30

FRM_VENDOR_CREATE. DATA:LV_FLG. DATA:LS_MAIN TYPE VMDS_EI_MAIN, LS_MESG TYPE CVIS_MESSAGE, LT_MSG TYPE BAPIRET2_T, LWA_MSG TYPE BAPIRET2, LT_VEND TYPE VMDS_EI_EXTERN_T, LWA_VEND TYPE VMDS_EI_EXTERN, LT_COMPANY TYPE VMDS_EI_COMPANY_T, LWA_CO

FRM_VENDOR_CREATE.
DATA:LV_FLG.
DATA:LS_MAIN TYPE VMDS_EI_MAIN,
LS_MESG TYPE CVIS_MESSAGE,

LT_MSG TYPE BAPIRET2_T,
LWA_MSG TYPE BAPIRET2,

LT_VEND TYPE VMDS_EI_EXTERN_T,
LWA_VEND TYPE VMDS_EI_EXTERN,

LT_COMPANY TYPE VMDS_EI_COMPANY_T,
LWA_COMPANY TYPE VMDS_EI_COMPANY,

LT_BANKDETAILS TYPE CVIS_EI_BANKDETAIL_T,
LWA_BANKDETAILS TYPE CVIS_EI_CVI_BANKDETAIL,"CVIS_EI_BANKDETAIL.

LT_PURCHASING TYPE VMDS_EI_PURCHASING_T,
LWA_PURCHASING TYPE VMDS_EI_PURCHASING,

LT_FUNCTIONS TYPE VMDS_EI_FUNCTIONS_T,
LWA_FUNCTIONS TYPE VMDS_EI_FUNCTIONS.

* 主数据
LWA_VEND-HEADER-OBJECT_TASK = 'I'.

*LWA_VEND-HEADER-OBJECT_INSTANCE-LIFNR = 'A20101241'.

LWA_VEND-CENTRAL_DATA-CENTRAL-DATA-KTOKK = 'Z002'.
LWA_VEND-CENTRAL_DATA-CENTRAL-DATAX-KTOKK = 'X'.

*地址数据
LWA_VEND-CENTRAL_DATA-ADDRESS-TASK = 'I'.
LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATA-TITLE = '0002'.
LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATA-NAME = 'LSI Logic Storage System, Inc'.
LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATA-LANGU = SY-LANGU.
LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATA-COUNTRY = 'CN'.
LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATA-SORT1 = 'LSI'.
LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATA-SORT2 = 'LSI'.
LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATA-STREET = '1621 Barber Lane Milpitas,'.
LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATA-HOUSE_NO = 'California'.
*LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATA-POSTL_COD1 = '466303'.
*LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATA-CITY = '青岛'.
LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATA-COUNTRY = 'US'.
*LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATA-REGION = '120'.

LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATAX-TITLE = 'X'.
LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATAX-NAME = 'X'.
LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATAX-LANGU = 'X'.
LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATAX-COUNTRY = 'X'.
LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATAX-SORT1 = 'X'.
LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATAX-SORT2 = 'X'.
LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATAX-STREET = 'X'.
LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATAX-HOUSE_NO = 'X'.
*LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATAX-POSTL_COD1 = 'X'.
*LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATAX-CITY = 'X'.
LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATAX-COUNTRY = 'X'.
*LWA_VEND-CENTRAL_DATA-ADDRESS-POSTAL-DATAX-REGION = 'X'.

*银行数据
***LWA_BANKDETAILS-TASK = 'I'.
***LWA_BANKDETAILS-DATA_KEY-BANKL = 'KHYH'.
***LWA_BANKDETAILS-DATA_KEY-BANKN = '232232322232323'.
***
***APPEND LWA_BANKDETAILS TO LT_BANKDETAILS.
***LWA_VEND-CENTRAL_DATA-BANKDETAIL-BANKDETAILS = LT_BANKDETAILS.

* 公司代码数据
*LWA_VEND-COMPANY_DATA-CURRENT_STATE = 'X'.
LWA_COMPANY-TASK = 'I'.
LWA_COMPANY-DATA_KEY-BUKRS = '1100'.

LWA_COMPANY-DATA-AKONT = '0021210101'.
LWA_COMPANY-DATA-ZTERM = 'Z008'.
LWA_COMPANY-DATA-ZWELS = 'E'.
LWA_COMPANY-DATA-TOGRR = 'Z001'.
LWA_COMPANY-DATA-REPRF = 'X'.
LWA_COMPANY-DATA-ZSABE = 'Z(090324转正)'.
LWA_COMPANY-DATA-INTAD = '2009.03.24 临时转正式'.
LWA_COMPANY-DATA-KVERM = '原机'.

LWA_COMPANY-DATAX-AKONT = 'X'.
LWA_COMPANY-DATAX-ZTERM = 'X'.
LWA_COMPANY-DATAX-ZWELS = 'X'.
LWA_COMPANY-DATAX-TOGRR = 'X'.
LWA_COMPANY-DATAX-REPRF = 'X'.
LWA_COMPANY-DATAX-ZSABE = 'X'.
LWA_COMPANY-DATAX-INTAD = 'X'.
LWA_COMPANY-DATAX-KVERM = 'X'.

APPEND LWA_COMPANY TO LT_COMPANY.
LWA_VEND-COMPANY_DATA-COMPANY = LT_COMPANY.

*采购数据
LWA_PURCHASING-TASK = 'I'.
LWA_PURCHASING-DATA_KEY-EKORG = '1100'. "采购组织

LWA_PURCHASING-DATA-WAERS = 'USD'.
LWA_PURCHASING-DATA-ZTERM = 'Z008'.
***LWA_PURCHASING-DATA-INCO1 = ''.
LWA_PURCHASING-DATA-KALSK = 'Z1'.
LWA_PURCHASING-DATA-VERKF = '刑刚'.
LWA_PURCHASING-DATA-TELF1 = '13925135205'.
LWA_PURCHASING-DATA-WEBRE = 'X'.
LWA_PURCHASING-DATA-KZABS = 'X'.
LWA_PURCHASING-DATA-KZAUT = 'X'.
LWA_PURCHASING-DATA-BSTAE = 'Z001'.
***
LWA_PURCHASING-DATAX-WAERS = 'X'.
LWA_PURCHASING-DATAX-ZTERM = 'X'.
***LWA_PURCHASING-DATAX-INCO1 = 'X'.
LWA_PURCHASING-DATAX-KALSK = 'X'.
LWA_PURCHASING-DATAX-VERKF = 'X'.
LWA_PURCHASING-DATAX-TELF1 = 'X'.
LWA_PURCHASING-DATAX-WEBRE = 'X'.
LWA_PURCHASING-DATAX-KZABS = 'X'.
LWA_PURCHASING-DATAX-KZAUT = 'X'.
LWA_PURCHASING-DATAX-BSTAE = 'X'.

LWA_FUNCTIONS-TASK = 'I'.
LWA_FUNCTIONS-DATA_KEY-PARVW = 'BA'.
APPEND LWA_FUNCTIONS TO LT_FUNCTIONS.

LWA_FUNCTIONS-TASK = 'I'.
LWA_FUNCTIONS-DATA_KEY-PARVW = 'LF'.
APPEND LWA_FUNCTIONS TO LT_FUNCTIONS.

LWA_FUNCTIONS-TASK = 'I'.
LWA_FUNCTIONS-DATA_KEY-PARVW = 'RS'.
APPEND LWA_FUNCTIONS TO LT_FUNCTIONS.

LWA_PURCHASING-FUNCTIONS-FUNCTIONS = LT_FUNCTIONS.

APPEND LWA_PURCHASING TO LT_PURCHASING.
LWA_VEND-PURCHASING_DATA-PURCHASING = LT_PURCHASING.

APPEND LWA_VEND TO LT_VEND.
LS_MAIN-VENDORS = LT_VEND.

CALL METHOD VMD_EI_API=>MAINTAIN
EXPORTING
* IV_TEST_RUN = SPACE
IS_MASTER_DATA = LS_MAIN
IMPORTING
ES_ERROR = LS_MESG .

LT_MSG = LS_MESG-MESSAGES.

LOOP AT LT_MSG INTO LWA_MSG.
WRITE: / LWA_MSG-TYPE,LWA_MSG-MESSAGE.
IF LWA_MSG-TYPE = 'E' OR LWA_MSG-TYPE = 'A'.
LV_FLG = 'X'.
ENDIF.
ENDLOOP.
IF LV_FLG IS INITIAL.
COMMIT WORK.
ELSE.
ROLLBACK WORK.
ENDIF.
ENDFORM.

热心网友 时间:2022-05-06 19:38

没用过 但是我记得我收藏夹里有个讲这个东西的sample code

但是现在不是自己的本子 等拿到了自己本子给你看看
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
长春小飞没有车没有房 碳钢的多久生锈 碳钢多久会生锈 碳钢多长时间会开始生锈 碳钢和铝哪个容易生锈 梦见天宫图是什么意思 光遇2023好友树解锁图鉴 光遇二级节点多少个 ...火柴小女孩》《词语手册》里有很多词语的意思的,求告知 暖融融解释 领淘通淘客助手这个软件怎么样? 激光手术真的可以让近视眼恢复到正常的视力吗,做一个要多少钱? 近视一个眼睛450度,一个500度,如果去做手术大约在多少钱左右,有没有后遗症 飞秒激光近视手术多少钱一只眼,两只眼能打折吗? 临沧做一个近视眼手术多少钱,市人民医院 在深圳近视眼手术需要多少钱? 现在雅安市第一人民医院做一个近视眼手术需要多少钱? 做一个近视眼手术一般需要多少钱 武汉近视手术眼科,近视手术价格是多少? 那位英语达人帮忙翻译下涨薪申请,跪谢 我想提涨工资,但不知道怎么开口 要怎样跟领导说加工资 跟领导申请涨工资了,是发邮件的,后来领导通知邮件回复我同意了,我该如何回复领导的邮件呢? 做串串生意,煮的串串卖多少钱一串合适?一串串多少?油炸的鸡柳,骨肉相连,鱼排等分别是多少钱一串合适 求英语高手如何写加薪邮件 利用邮件向老板提加薪如何? 跟老板提加薪,发邮件谈合适吗? 申请涨工资英文电子邮件怎么写 蹦着脸的读音 军务倥偬读音和意思 “倥侗”的“标准”读音? 蝴蝶的特点是什么? (奇特) 准备给宝宝做糯米蒸排骨,需要用的食材有哪些呢? 给2岁宝宝做排骨汤的做法 怎么做排骨汤给宝宝喝 有人有科学养兔的方法吗? 做董秘要年轻漂亮吗?你对董秘岗位的重要性和特殊性了解多少。 想成为企业经营管理型人才,董事会秘书这个职位是不是个好平台? 董事会秘书处都有什么职位 如何地窝养兔 上市公司,董事会秘书可以同时是总经理办公会成员吗?同时负责两方面工作会不会有影响 养兔子时要怎样它才不会生病呢 韩国的研究生是分专硕跟学硕吗? 莫斯科读研究生分学硕和专硕吗 是不是考是不是硕士每个专业都有专硕和学硕的分别啊 高一军训完写周记,题目是我就是我不一样的烟火,不少于400字,跪求思路 我就是我,不一样的烟火 做文员难不难 学做文员难吗? 文员工作难不难? 文员这个工作难做么?