Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

workflow function module

Former Member
0 Likes
458

I created a zbusiness object (ZPRODH)with

one key field product hierarchy,

one attribute level number and

one method display.

I tested that zobject and it is displaying it. now I created a workflow to display this and have to call it from one abap program.

In the abap program I am calling the funcion module, I need to pass the product hierarcy ( how can I pass it)

data: p_workitem LIKE SWR_STRUCT-WORKITEMID,

p_subrc like sy-subrc.

CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'

EXPORTING

TASK = 'WS99900007'

LANGUAGE = SY-LANGU

IMPORTING

RETURN_CODE = p_subrc

WORKITEM_ID = p_workitem

but it is not working, can anybody tell me what is the issue. this is my first workflow. so I am not sure I am missing anything for not. Please help me

Thanks in advance

3 REPLIES 3
Read only

Former Member
0 Likes
399

I created a zbusiness object (ZPRODH)with

one key field product hierarchy,

one attribute level number and

one method display.

I tested that zobject and using this object created workflow to display product hierarchy ,it is displaying it. now I have to call it from one abap program.

In the abap program I am calling the funcion module, I

CALL FUNCTION 'SWW_WI_START_SIMPLE'

EXPORTING

TASK = TASK

IMPORTING

WI_ID = WI_ID

TABLES

AGENTS = AGENTS

WI_CONTAINER = WI_CONTAINER.

It is calling the workflow and subrc is 0, but not passing the value to the workflow. Because of that the method is not working,

Thanks in advance

Read only

Former Member
0 Likes
399

hi check these links...

regards,

venkat.

Read only

0 Likes
399

Problem solved, issue was continer not defined properly.