on 04-05-2012 5:45 PM
1) I had used the user Decision(TS00008267) with the two Decision Text
a)sale view reqd
b)sale view not reqd
And also i created a Agent by using Rule in this User Decision.So that workitems will trigger.
Based on the above two Decision Text two lines will be generated i.e One line is for sale view reqd and another line is for
sale view not reqd
1)In the sales view Req - I created a Activity i.e (custom ) where it opens the MM01 tcode.
2)sale view not reqd - I created a process Control by putting the funciton Cancel Workitem
this type of design i had done for all the views in MM01 by one after and onfter in SWDD
Based on the above Sales Agent will get the workitem and he logs the tcode SBWP tcode and execute the workitem and he will click on button 'Sales View req' and it open the MM01 tcode and once he creates the Sales View and it goes to next agent to the Storage Agent and he creates Storage Agent and this will continue all the views in MM01 and I had designed in SWDD by created Workflow. And it is working fine.
Now the new requirment is the workitem comes to SalesAgent i.e in his inbox but SalesAgent will not log in SBWP tcode and but direcly navigates to MM01 and creates the Sales View but it should trigger the workflow and could you please tell me how to handle this
Your approval step should have a "terminating" event. Terminating events are used when users process objects directly in their transactions and not through SBWP. So, when a Sales agent is created in MM01, an event that terminates the current approval step should be triggered.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If i implement this Terminating Event in the Approval Step i.e User Decision step and it will work both i.e SBWP and asl well as directly navigating in MM01
I created a Event Salesviewcreate(Custom event) in SWO1 and in the userexit i added the code
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
OBJECT_TYPE = 'ZBS1001006'
OBJECT_KEY = objkey
EVENT = 'SALESVIEWCREATED'
COMMIT_WORK = 'X'
* EVENT_LANGUAGE = SY-LANGU
* LANGUAGE = SY-LANGU
* USER = SY-UNAME
* IFS_XML_CONTAINER =
* IMPORTING
* RETURN_CODE =
* EVENT_ID =
* TABLES
* INPUT_CONTAINER =
* MESSAGE_LINES = lt_msglines
* MESSAGE_STRUCT =
.
if sy-subrc eq 0.
commit work.
endif.
I added this Event 'SALESVIEWCREATED' in my Activity under the Terminating Event.
when ever i hit save button in MM01 and it Navigates to function module 'SAP_WAPI_CREATE_EVENT' which i added in Userexit and it will come out from MM01 with out Saving it .
After this function module executed it will not be saving what i added in MM01
The Requirment is whether Agent logged in SBWP and execute the workitem and another one he directly logged into MM01 in both scenarios it should work
1.When the Agent logged in the SBWP transaction and executes the workitem and navigates to the MM01 and created the sales View and hit save button and i used the below code in the UserExit
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
OBJECT_TYPE = 'ZBS1001006'
OBJECT_KEY = objkey
EVENT = 'SALESVIEWCREATED'
* COMMIT_WORK = 'X'
* EVENT_LANGUAGE = SY-LANGU
LANGUAGE = SY-LANGU
USER = SY-UNAME
* IFS_XML_CONTAINER =
* IMPORTING
* RETURN_CODE =
* EVENT_ID =
TABLES
* INPUT_CONTAINER =
MESSAGE_LINES = SWR_MESSAG1
* MESSAGE_STRUCT =
and when execution comes to this function module in the Userexit of MM01 and when this function module is executed and MM01 is not getting saved.but when i look at the SWEL it is giving as Terminating Event is triggered.but My MM01 transaction is not getting saved.it is coming out from MM01 with out saving it .
2.Now Agent logged directly to MM01 and try to create the SalesView and hit save button and after executing of function module and SWR_MESSAG1 is showing as "Event created - no receiver found"
and i did not put commit as 'X'
And also could you please tell me what is WAPI only in update task. how to handle this
Now the issue is only if the Agent logged directly to MM01
Now Agent logged directly to MM01 and try to create the SalesView and hit save button and after executing of function module and SWR_MESSAG1 is showing as "Event created - no receiver found"
I had resolved the problem by loging to SBWP and executing the workitem and i am able to save the MM01 transaction.
resolved by keeping as COMMIT_WORK = space
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
OBJECT_TYPE = 'ZBS1001006'
OBJECT_KEY = objkey
EVENT = 'SALESVIEWCREATED'
COMMIT_WORK = space
* EVENT_LANGUAGE = SY-LANGU
LANGUAGE = SY-LANGU
USER = SY-UNAME
* IFS_XML_CONTAINER =
* IMPORTING
* RETURN_CODE =
* EVENT_ID =
TABLES
* INPUT_CONTAINER =
MESSAGE_LINES = SWR_MESSAG1
* MESSAGE_STRUCT =
Now Agent logged directly to MM01 and try to create the SalesView and hit save button and after executing of function module and SWR_MESSAG1 is showing as "Event created - no receiver found"
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.