Hi,
I am using FM SAP_WAPI_START_WORKFLOW to start a workflow.
I am able to start a workflow when I am not putting anything in input_container.
However my requirement is to pass a structure in input container paramter of this FM. I went through many forum replies on this - but most of those are unanserwed and I have already tried many of those, so posting my own.
So my requirement is that I have a structure say ZSTR - with fields 'STATE, CITY ZIP. I want to know how to pass this structure ZSTR to FM.
Problem is that input container has ony two fields Element and value. So if I put code below - I either get error 'Structures of type ZSTR cannot be assigned any constants - this is when I crate task container and workflow container as ABAP dictionary data type- multiline.
when I define task container as table type ( after i created table type for same structure as line type) - I get error - same element is used 15 times..
for some other requirement I was able to pass values containing internal table in parameter even_container of FM like SWE_EVENT_CREATE, as this container has an index field which identifies values of structure..but SAP_WAPI_START_WORKFLOW parameter does not have that field.
i have created one container and put code as below :
swc_create_container gi_input_container.
swc_set_table gi_input_container 'E_state' gi_state. "where gi_state is table of type ZSTR
LOOP AT gi_input_container INTO gs_input_container.
MOVE-CORRESPONDING gs_input_container TO ls_simple_container.
APPEND ls_simple_container TO lt_simple_container .
ENDLOOP.
Can someone help me to solve this issue?
I have created a class and this class is used to create task .
Thanks
SK