当前位置:网站首页>Research on manually triggering automatic decision of SAP CRM organization model with ABAP code
Research on manually triggering automatic decision of SAP CRM organization model with ABAP code
2022-07-01 15:23:00 【Hua Weiyun】
(1) Research partner determination Can you draw out the logic of , With API Our driving is Odata service implementation code Call inside ?
Yes. I am here AG3 I wrote a little report ZPARTNER_DETERMINE_VIA_CODE,partner determination The core is function module CRM_PARTNER_DETERMINATION_OW, About how to use this FM,runtime What parameters need to be passed when , Please refer to the report Code for .
Last determination Of output It's a internal table, It contains every determine Coming out BP id namely partner function. In my case ,determine Out came employee responsible, Here's the picture :
(2) take Partner determination After the logic is extracted , Can the study be carried out in CRM_ORDER_MAINTAIN in suppress Live inside partner determination call?
Technically speaking, Our need is to callstack 28 Of CRM_ORDER_MAINTAIN The whole sub callstack in , Not supposed to show up partner determination API Call to .
But now callstack 36 There is , From the code callstack 35 , line 374 This... Is called statically FM, There is no switch , The following statement is used to selectively call :
IF iv_partner_determination_active = ‘X’.CALL FUNCTION ‘CRM_PARTNER_DETERMINATION_OW’ ENDIF.
So what I need to do research Namely , See if there is a way to CRM_ORDER_MAINTAIN This one in determination call Execute but not take effect . I already have some idea, Need to write a POC verification .
- CRM_ORDER_MAINTAIN Inside partner determination It's fine too disable, The method is as follows :
As shown in the second screenshot of the email below , Although we can't stop CRM_PARTNER_DETERMINATION_OW This FM Itself is called , But we can make this FM By call When we get there , Not doing anything , direct return, Thus, we can achieve disable determination Purpose .
We just need to call order maintain Shi Chuange switch Parameter in :(A On behalf of not executing partner determination, I tried to pass B no way , Pass on B Words ,partner determination Will be in CRM_ORDER_MAINTAIN subcallstack Another execution of )
such determination API By call When we arrive , Check this flag, If A, be EXIT, This really determination step Not execute .
Last step: Write a report, take partner_determ Set as inactive, And then use CRM_ORDER_MAINTAIN Create a order,
hard code One BP go in , If the last call CRM_ORDER_SAVE after order You can still see this BP, That means there's no problem with this road .
POC Done ,AG3 report ZDETER_AND_CREATE
This report Do three things :
- Create a new process type by SC1 Of service contract
- call partner determination Of API, complete determination Logic ( In this case determine Out came employee responsible:Jerry)
- take step2 Got partner assign To step1 Created service contract in , meanwhile hard code the other one Bill to party:Wuji
- call order save Will create the service contract Save to DB
How to use the report Please refer to the attached video.
Below is a use of POC report Created service contract The screenshots , Red is report hard code Of , Black is partner determination API Calculated .
Organization unit determination The actual and Partner determination not quite the same .
First of all, make it clear ,Organization unit determine Of API(A), Every time document On partner The data changes change after , from one order framework One of the registered callback(B) Called .
We can't stop B Go to call A.
About organization unit determination( hereinafter referred to as OUD) Of disable, With WebUI For example , There are three kinds of scenario Discuss :
Create a new one opportunity, Manual input organization unit, enter ,trigger CRM_ORDER_MAINTAIN
OUD Not trigger ,user Of manual input Higher priority .Technically speaking, stay call OUD API There was a conditional judgment .
I am here AG3 There's a report, use hard code sales org To simulate user Manual input , Find out API It won't be call To .
If one Opp Has been saved , And organization unit Not empty , So when partner Information happens change after ,OUD API Not trigger .
If one Opp Has been saved ,user from UI Manual handle org unit The information is left blank , enter :
My test results are OUD API Will trigger :
Determine Out 4 individual candidate With popup In the form of user choice :
If you just turn it off popup, You can successfully save , here org unit The data has been cleared successfully :
in the light of FIORI The situation of
CASE 1:
Creating OPPT When , Input ACCOUNT, Trigger DETERMINATION. If ORG By DETERMING Come out , When saving , For the background, this is actually a manual input ORG, Not trigger OUD, That's all right. .
CASE 2:
Creating OPPT When , Input ACCOUNT, Trigger DETERMINATION.ORG Has not been DETERMING come out , But the user manually entered , When saving , For the background, this is a manual input ORG, Not trigger OUD, That's all right. .
CASE 3:
Creating OPPT When ORG Has not been DETERMING come out , But the user did not enter it manually , When saving ,OUD It doesn't matter whether it triggers , Because the probability event is OUD DETERMING Nothing comes out , Will not change the order , That's all right. .( Small probability events are due to OPPT Other... Are entered in PARTNER, Cause when you save, you can DETERMING come out ORG 了 )
边栏推荐
- 微信网页订阅消息实现
- What if you are always bullied because you are too honest in the workplace?
- Flink 系例 之 TableAPI & SQL 与 MYSQL 分组统计
- 说明 | 华为云云商店「商品推荐榜」
- 【一天学awk】函数与自定义函数
- Phpcms background upload picture button cannot be clicked
- Flink 系例 之 TableAPI & SQL 与 Kafka 消息插入
- These three online PS tools should be tried
- 张驰咨询:锂电池导入六西格玛咨询降低电池容量衰减
- [antenna] [3] some shortcut keys of CST
猜你喜欢
openssl客户端编程:一个不起眼的函数导致的SSL会话失败问题
微信小程序01-底部导航栏设置
Wechat official account subscription message Wx open subscribe implementation and pit closure guide
Summary of point cloud reconstruction methods I (pcl-cgal)
k8s部署redis哨兵的实现
竣达技术丨多台精密空调微信云监控方案
Opencv Learning Notes 6 -- image feature [harris+sift]+ feature matching
How to realize clock signal frequency division?
重回榜首的大众,ID依然乏力
【一天学awk】条件与循环
随机推荐
idea中新建的XML文件变成普通文件的解决方法.
Can I choose to open an account on Great Wall Securities? Is it safe?
精益六西格玛项目辅导咨询:集中辅导和点对点辅导两种方式
选择在长城证券上炒股开户可以吗?安全吗?
Flink 系例 之 TableAPI & SQL 与 MYSQL 插入数据
【STM32学习】 基于STM32 USB存储设备的w25qxx自动判断容量检测
The first technology podcast month will be broadcast soon
Opencv learning notes 5 -- document scanning +ocr character recognition
贝联珠贯加入龙蜥社区,共同促进碳中和
What if you are always bullied because you are too honest in the workplace?
Summary of empty string judgment in the project
Demand prioritization method based on value quantification
Filter &(登录拦截)
智能运维实战:银行业务流程及单笔交易追踪
Detailed explanation of ArrayList expansion, expansion principle [easy to understand]
张驰课堂:六西格玛数据的几种类型与区别
Flink 系例 之 TableAPI & SQL 与 MYSQL 数据查询
【ROS进阶篇】第五讲 ROS中的TF坐标变换
《QT+PCL第六章》点云配准icp系列6
STM32F411 SPI2输出错误,PB15无脉冲调试记录【最后发现PB15与PB14短路】