on 06-23-2010 6:16 AM
Hi,
I have a requirement where I need to update a main workflow container element from a sub-workflow, while the sub-workflow is still running. (In-Progress)
I have tried using the FM SAP_WAPI_WRITE_CONTAINER in sub-workflow, but it returns an error saying "Cannot call WAPI interface 'SAP_WAPI_WRITE_CONTAINER' in this context".
I have also tried FM SWW_WI_CONTAINER_MODIFY, but it does not update at all.
I have also tried triggering an even in sub-workflow, which in turn triggers a class method, but it gives an errors saying "WF locked"
Please let me know if you have any other strategies.
Thanks
Krishna
Hi,
what I can suggest you is try to create a program exit in the subworkflow and in the program exit you can access the main workflow F wotkitem ID, by using thie main workflow workitem ID try to create the instance of the container. and from there in the program exit class you can set and get the values of the workflow container elements.
but here you have to make sure that you have to create the instance of the parent workitem ID container, but not the subworkflow workitem ID container.
[Program Exits In Workflow |http://wiki.sdn.sap.com/wiki/display/ABAP/ProgramExitsIn+Workflow]
Regards
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would probably create a task that I call in the main workflow to read the container of the sub-workflow. So, instead of using SAP_WAPI_WRITE_CONTAINER, use SAP_WAPI_READ_CONTAINER in this task and pass back the details you want to the main workflow. The trick here is to figure out the sub-workflow task ID. You can read the current workflow instance and find out the ID of the included sub-workflow instance.
Alternatively, you can pass the main Workflow ID to the child workflow and the child can write the values into a table that the parent can access using its own ID. I don't like this approach, but it works.
Regards,
Abdullah Azzouni
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Define table and element at workflow container ...define their proerties as export parametes .....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Krishna Kishor Kammaje !
You have to pass data from sub workflow to main workflow.
So, please check your bindings that carries data from sub workflow to main workflow.
Regards,
S.Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.