in my method of a Business Object I need to get the value of the element WorkitemID of my task container.
I tried the following to read the value of the element:
swc_get_element container 'WorkitemID' lv_wiid.
But I don't get the workitemID of the task.
What am I doing wrong here?
Thanks for your help.
Are you making a call to the BO method from the task you are using?
If yes, then in the binding between the task container and the method container, pass the workitem element you need to pass to the method.
In the BO method, add an input parameter 'WorkitemID' of the same type as the workitem element.
Now create a data element in the method code of name 'lv_wiid' of the same type as WorkitemID.
Then use the code:
swc_get_element container 'WorkitemID' lv_wiid
to fetch the value of the element in the code.
Hope this helps!