SAP CRM One order裏user status和system status的mapping邏輯

Below example show: How the mapping relationship between User status and System status maintained in One Order.數據庫

APP: My Opportunity Transaction type: OPSMapp

First,I create an new Opportunity in WebClientUI, I set the status with E0001( User status).學習

新建一個Opportunity,將其status 設置成E0001( User status):debug

After I saved the Opportunity, in the DB, I can find both user status E0001 - Open and system status I1002 there.3d

保存以後,在數據庫裏針對該Opportunity不單單存儲了用戶手動選擇的user status E0001 - Open,還保存了以下的system status I1002:code

Second,How the mapping relationship between User status and System status maintained in One Order? 這個user status到system status的mapping 邏輯: Step1. Under transaction type OPSM, we can find status profile.blog

找到transaction type OPSM 對應的status profile:ip

Step2. In the status profile, we can find the business transaction OPEN of user status. 找到該 user status對應的business transaction OPEN:it

Step3.Based on the business transaction OPEN, we will select system status from TJ06 where VRGNG = business transaction OPEN and INACT not equal Xio

系統從step2裏取得business transaction以後,根據VRGNG = transaction的邏輯到TJ06裏去查找全部結果INACT不爲X的entry,結果即爲該user status對應的全部system status

Then,The configure point for table TJ06: tcode BS32 TJ06 表裏的entry經過tcode BS32維護:

Finally,You can find below 3 steps in below function module. 上述三步系統的執行邏輯能夠經過debug以下的function module來學習:

再看另外一個例子: 建立Task的時候,能夠選擇的status是根據Task的status profile來的,最終會看到在Table TJ30中會有各類user status對應task這個transaction,其中就包括released:

可是在WEB UI新建task的drop down list裏面卻沒有這個user status:

這是由於在Web UI上,雖然drop down list裏面的status是從TJ30來的,可是這期間還有對新建transaction的status check。在Table TJ07或者Tcode BS22中,有對user status和system status之間的mapping:

其中I1030是system status,它對應的releases這個user status 的配置是forbidden,意思是當transaction上有error的時候,改變transaction的狀態到released是被禁止的。因此在Web UI上新建一個task的時候,由於還有不少字段沒有維護,因此transaction的system status是contains error - I1030的狀態,Page上的每次change操做都會觸發狀態檢查,一旦有I1030這個狀態,對應的released user status就會從drop down list中拿掉。

若是維護了全部必填字段確保transaction沒有error,released status就會出如今drop down list中:

要獲取更多Jerry的原創文章,請關注公衆號"汪子熙":

相關文章
相關標籤/搜索