on 11-15-2016 10:25 AM
Use SAP_WAPI_DECISION_COMPLETE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krishna,
Is the front end task required? Is it possible to redesign the workflow? How is the status from the other system communicated. I think it will be best on the long run to revisit the workflow design.
Regards,
Sankar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi rob,
It's not hard coded , Every time I am changing the work item from SWWWIHEAD table as per workflow no.
Requirement : I will get approve status from another system, Based on that status I need to execute current form depends on user (APPROVE / REJECT ) .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rob,
thanks for your reply, I am using below code to execute work item. the status is showing Completed but the next step mail triggering is failed.
but the same process is working while I am doing it in foreground. Please let me know if any other FM or classes are available.
data:EV_DECISION_KEY type SWY_RET1,
EV_WI_ID type SWW_WIID.
EV_DECISION_KEY = 'Approve'."'01'.
EV_WI_ID = '000057239313'.
LW_CONTAINER-VALUE = EV_DECISION_KEY.
LW_CONTAINER-ELEMENT = 'PROCSTATE'.
APPEND LW_CONTAINER TO LT_CONTAINER.
CALL FUNCTION 'SAP_WAPI_WRITE_CONTAINER'
EXPORTING
WORKITEM_ID = EV_WI_ID
IMPORTING
RETURN_CODE = LV_RETURN_CODE
TABLES
SIMPLE_CONTAINER = LT_CONTAINER
MESSAGE_STRUCT = LT_MSGTAB.
IF LV_RETURN_CODE EQ 0.
CALL FUNCTION 'SAP_WAPI_WORKITEM_COMPLETE'
EXPORTING
WORKITEM_ID = EV_WI_ID
IMPORTING
RETURN_CODE = LV_RETURN_CODE
NEW_STATUS = LV_NEW_STATUS
TABLES
MESSAGE_STRUCT = LT_MSGTAB2.
COMMIT WORK.
APPEND LINES OF LT_MSGTAB2 TO LT_MSGTAB.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You should check the SAP_WAPI* function modules if you can execute this foreground step in the background.
If your process has been changed then you should change the workflow model.At one point in time there was a need for a user to pick up the workitem, look at it and make a decision to approve it or to reject it.
If this requirement has become obsolete then the workflow model should represent the new process flow.
Kind regards, Rob Dielemans
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.