CRM合同转SAP订单
insert into ZVBAK(ZCRMID,ZOPERA,ZSYSTY,ZDATE1,ZTIME1,DOC_TYPE,BUKRS,SALES_ORG,DIVISION,SALES_OFF,SALES_GRP,PSPID,PURCH_NO_C,PURCH_DATE,REQ_DATE_H, PMNTTRMS, BILL_BLOCK, ZFLAG, CFLAG, MANDT, TYPE_GROUP, DISTR_CHAN ) values(${entity.FId},1,2,TO_CHAR(now(),'YYYYMMDD'),TO_CHAR(now(),'HHMMSS'),'ZS01', (select FCompanyId from TsDepartment where FId=${entity.FSalesDepartmentId}), (select FVkOrg from TuSalesOppt where FId=${entity.FSalesOpptId}), (select FIndustry from TuSalesOppt where FId=${entity.FSalesOpptId}), (select FVkbur from TuSalesOppt where FId=${entity.FSalesOpptId}), (select FVkgrp from TuSalesOppt where FId=${entity.FSalesOpptId}), (select FName from TuSalesOppt where FId=${entity.FSalesOpptId}), (select FName from TuSalesOppt where FId=${entity.FSalesOpptId}), TO_CHAR(now(),'YYYYMMDD'), TO_CHAR(now(),'YYYYMMDD'), 'D000', 'Z1', 0, 0, 810, 1, '01' ); insert into ZVBPA(ZCRMID, ZOPERA, ZSYSTY, ZDATE1, ZTIME1, MANDT, ZVBAK_CRMID, PARTN_ROLE, PARTN_NUMB, TEXT_LINE, TYPE_GROUP, ZFLAG, CFLAG )VALUES(uuid(), 1, 2, TO_CHAR(now(),'YYYYMMDD'), TO_CHAR(now(),'HHMMSS'), 810, ${entity.FId}, 'AG', ${entity.FSAPCustomerNum}, '', 1, 0, 0 ); insert into ZVBPA(ZCRMID, ZOPERA, ZSYSTY, ZDATE1, ZTIME1, MANDT, ZVBAK_CRMID, PARTN_ROLE, PARTN_NUMB, TEXT_LINE, TYPE_GROUP, ZFLAG, CFLAG )VALUES(uuid(), 1, 2, TO_CHAR(now(),'YYYYMMDD'), TO_CHAR(now(),'HHMMSS'), 810, ${entity.FId}, 'VE', (select FLoginName from TsUser where FId=${entity.FSignedUserId}), '', 1, 0, 0 );
ZVBAP部分
insert into ZVBAP(MANDT,ZCRMID,ZOPERA,ZSYSTY,ZDATE1,ZTIME1, ZVBAK_CRMID, TYPE_GROUP, REQ_QTY, MATERIAL, PLANT, TARGET_QTY, COND_TYPE, COND_VALUE, ZFLAG, CFLAG ) values (100, uuid(), 1, 2, TO_CHAR(now(),'YYYYMMDD'), TO_CHAR(now(),'HHMMSS'), ${entity.FContractId}, 1, 1, ( select case FAmountType when to_nchar('现场') then 'S000003' when to_nchar('柜台') then 'S000002' when to_nchar('设计费') then (select case FProperty when to_nchar('Design') then 'S000019' else 'S000001' end from TuSalesOppt where FId=(select FSalesOpptId from TcContract where FId=${entity.FContractId}) ) else 'S000004' end from TcContractDetail where FId='734b6013-667e-4836-a3bb-87e31969b98e'), ( select FCompanyId from TsDepartment where FId=(select FSalesDepartmentId from TcContract where FId=${entity.FContractId})), 1, 'ZPR0', ${entity.FAmount}, 0, 0 )
Rust编程语言群 1036955113
java新手自学群 626070845
java/springboot/hadoop/JVM 群 4915800
Hadoop/mongodb(搭建/开发/运维)Q群481975850
GOLang Q1群:6848027
GOLang Q2群:450509103
GOLang Q3群:436173132
GOLang Q4群:141984758
GOLang Q5群:215535604
C/C++/QT群 1414577
单片机嵌入式/电子电路入门群群 306312845
MUD/LIB/交流群 391486684
Electron/koa/Nodejs/express 214737701
大前端群vue/js/ts 165150391
操作系统研发群:15375777
汇编/辅助/破解新手群:755783453
大数据 elasticsearch 群 481975850
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
java新手自学群 626070845
java/springboot/hadoop/JVM 群 4915800
Hadoop/mongodb(搭建/开发/运维)Q群481975850
GOLang Q1群:6848027
GOLang Q2群:450509103
GOLang Q3群:436173132
GOLang Q4群:141984758
GOLang Q5群:215535604
C/C++/QT群 1414577
单片机嵌入式/电子电路入门群群 306312845
MUD/LIB/交流群 391486684
Electron/koa/Nodejs/express 214737701
大前端群vue/js/ts 165150391
操作系统研发群:15375777
汇编/辅助/破解新手群:755783453
大数据 elasticsearch 群 481975850
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。