Hello,
In my workflow I referenced an element as BUS1065. Now I try to execute the WF per code like this:
container-element = 'NUMBER'.
container-value = '51903016'.
APPEND container.
CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
EXPORTING
task = 'WS91000002'
language = sy-langu
do_commit = 'X'
user = sy-uname
IMPORTING
return_code = return_code
workitem_id = workitem_id
TABLES
input_container = container.
I only get an error (4 in return_code). When I execute the WF directly, I have to enter the employee number ('51903016') directly, since it is the key field but when I do it per code, I just don´t know how to declare it:
container-element = 'NUMBER'. container-element = 'BUS1065.NUMBER'. container-element = 'BUS1065-NUMBER'. container-element = 'BUS1065'.
Somewhere here I found a posting telling that I should declare an element NUMBER for passing the emp. number and this should transfer the value to field NUMBER in BUS1065. Somehow it does not work.
So, where´s my error ??
Thanks.