Skip to Content
0
Former Member
Apr 06, 2011 at 05:24 AM

Manual Workitem Completion

18 Views

Hi ,

in my workflow i am using an activity(foreground) to call a webdynpro screen using below code (this code is written in a class).

DATA: lv_url TYPE string,

lt_app_params TYPE tihttpnvp,

ls_app_params TYPE ihttpnvp.

ls_app_params-name = 'INITIATOR'.

ls_app_params-value = initiator.

APPEND ls_app_params TO lt_app_params.

CLEAR ls_app_params.

ls_app_params-name = 'WI_ID'.

ls_app_params-value = wi_id.

APPEND ls_app_params TO lt_app_params.

CLEAR ls_app_params.

CALL FUNCTION 'WDY_CONSTRUCT_URL'

EXPORTING

application = 'YTEST_VAMK'

PARAMETERS = lt_app_params

IMPORTING

out_url = lv_url

EXCEPTIONS

invalid_application = 1

OTHERS = 2.

  • Launch the portal application with the form data in it

CALL METHOD cl_gui_frontend_services=>execute

EXPORTING

application = lv_url

EXCEPTIONS

OTHERS = 1.

My issue is that as soon the this activity is executed by the respective agents, workitem for this task is getting completed, to be specific as soon as the webdynpro screen is opened by the agent .. workitem is getting completed.

I dont want this workitem to be completed in that way..as i need to wait for some user action from the screen i.e. only if user performs some action in the screen , workitem should be completed.

iam planning to use the function module 'SAP_WAPI_WORKITEM_COMPLETE' on user action .

How can i hold the automatic completion of workitem ?