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

i042416發表於2018-12-21

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

APP: My Opportunity
Transaction type: OPSM

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

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

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

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

儲存之後,在資料庫裡針對該Opportunity不僅僅儲存了使用者手動選擇的user status E0001 - Open,還儲存瞭如下的system status I1002:

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

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.

找到transaction type OPSM 對應的status profile:

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

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

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

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

系統從step2裡取得business transaction之後,根據VRGNG = transaction的邏輯到TJ06裡去查詢所有結果INACT不為X的entry,結果即為該user status對應的所有system status

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

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


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

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

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

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

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

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

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

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

SAP CRM One order裡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中:

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

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

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


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2286047/,如需轉載,請註明出處,否則將追究法律責任。

相關文章