cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Workflow

Former Member
0 Kudos

Hi

Can anybody explain me how to use the function module 'SAP_WAPI_START_WORKFLOW'.

Regards.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

This fm is used to create the workflow...........

check this sample code............

data: z_bus2080 type swc_object.

data: begin of bus2080_key,

id like viqmel-qmnum,

end of bus2080_key.

data: wf_cont type SWR_CONT occurs 0 with header line.

parameters: qmnum like viqmel-qmnum.

bus2080_key-id = qmnum.

swc_create_object z_bus2080 'BUS2080' bus2080_key.

Populate first container element - object type BUS2080

clear wf_cont.

move: 'BUS2080' to wf_cont-element,

z_bus2080 to wf_cont-value.

append wf_cont.

Populate second container element - char variable USERNAME

clear wf_cont.

move: 'USERNAME' to wf_cont-element,

sy-uname to wf_cont-value.

append wf_cont.

Call WAPI function

CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'

EXPORTING

TASK = 'WS94600159' "<-- Your task ID

LANGUAGE = SY-LANGU

IMPORTING

RETURN_CODE =

WORKITEM_ID =

TABLES

INPUT_CONTAINER = wf_cont

MESSAGE_LINES =

MESSAGE_STRUCT =