on ‎2020 Mar 23 6:31 AM
Hi experts,
I'd like to understand a specific basic concept about the workflow and PR/PO link. When we create a PR/PO, and a workflow is triggered, we can see this workflow instance when we open the said PR/PO under the Approval Details tab.
Now I'm trying to understand, at which time is this link established between the PR/PO and the workflow instance?
Moreover, I'm assuming the above should be similar in case of both classic and flexible workflows. If it's different, in both cases, I'd be more interested to learn specific to the Flexible workflows.
Request clarification before answering.
HI mithun2kr
The link is by SWWFLEXPROC table.
The selection of the workflows is implemented in class CL_SWF_FLEX_BADI_UTILS, method IF_SWF_FLEX_IFS_BADI_WF_UTIL~GET_WORKFLOWS_BY_OBJ_ID. Check out the method for details or put a break-point here and run ME23N.
You can also examine how this method is used in ME23N - method INIT of class CL_SWF_FLEX_WEBGUI_WORKFLOW:
DATA(lo_factory) = cl_swf_flex_ifs_factory=>get_instance(
EXPORTING
iv_language = me->mv_language
iv_scenario_id = me->mv_scenario
).
DATA(lo_runtime_handler) = lo_factory->get_runtime_handler( ).
IF me->mv_wiid IS INITIAL AND me->ms_appl_obj IS NOT INITIAL.
me->mv_wiid = lo_factory->get_workflow_id_by_context( iv_leading_object = me->ms_appl_obj iv_context = me->mv_context ).
ENDIF.me->mv_scenario is the workflow scenario e.g. WS00800238 for PO release.
Call lo_factory->get_workflow_id_by_context returns workitem id.
HTH, BR
Dominik Tylczynski
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot. That's what I was looking for.
In this customer system (S/4HANA 1909), the method you mentioned, has a different code. But after looking around I could find the actual code I was looking for.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.