Status drop down list rendering logic with Status profile involved
In my previous blog How is status drop down list entry generated in Order detail page I research how the status drop down list entries are generated without any status profile assigned to transaction type. In this blog let’s take things one step further, to figure out the logic of drop down list where the status profile is assigned.
I copy a standard transaction type SRVO into ZSRV and assign a profile CRMOPPOR to it.
This is the setting of CRMOPPOR:
The first two statuses OLI1 and OLI2 will be ignored by the logic mentioned below simply because their stonr flag is 00:
And this is the runtime rendered drop down list:
Still set breakpoint on the same method CL_CRM_UIU_STATUS_INFO=>GET_STATUS_INFO, and open Service Order detail page.
First the current user status and system status is retrieved by FM CRM_STATUS_READ_OW:
These two statuses could also be directly queried from table CRM_JEST.
Then the same logic as introduced in previous blog, the eight statuses maintained in status profile CRMOPPOR is looped and each row is passed to FM CRM_STATUS_MAINTAIN_OW to perform status check:
This is the status data for service order before I make change:
Now I change the status to Won:
E0001 transfers to E0003, this transition is manually specified by me.
And why I1002 leads to the current new system status I1005 and I1027?
In include CRM_STATUS_CON, I1005 means “Completed” and I1027 means “Won”.
When status is changed from E0001 to E0002, business transaction WINN is set since it is maintained here:
And go to tcode BS32, locate WINN and click Where-used list icon:
And here is the answer why system status I1005 and I1027 are set automatically.
Be the first to leave a comment
You must be Logged on to comment or reply to a post.