Attachment when starting a WF via WAPI
Kjetil Kilhavn
list.sap-wug at vettug.no
Fri Sep 19 08:05:44 EDT 2014
Torsdag 18. september 2014 21.45.32 skrev Mike Pokraka:
> SAP_WAPI_START_WORFKLOW doesn't allow anything in the _ATTACH_OBJECTS
> container element.
Do you by that mean that you get an error message from SAP_WAPI_START_WORKFLOW
when you add _ATTACH_OBJECTS to the container, or just that whatever you pass
is not passed on to the workflow?
I can not access any SAP system at the moment so I can not check, but my guess
is that _ATTACH_OBJECTS is not an importing container element, and that is why
your solution will not work as expected (definition: as you want it to work).
Have you tried defining an importing container element and passing your
object(s) there, or changing - if that is possible - _ATTACH_OBJECTS to be an
importing container element. The downside to the former is of course that you
need to add a container operation step to your workflow to move the object(s)
to _ATTACH_OBJECTS.
Perhaps SAP cleaned up the solution and quit doing implicit mapping of
container elements with the same name -- or perhaps they never did that when
workflows started?
> And doing a SAP_WAPI_ATTACHMENT_ADD afterwards is not only ugly, it is
> also unreliable if the workflow does a few background steps in the
> beginning.
>
> I can do it via the internals, so a plan B is not what I'm after; the
> question is really about whether it's possible with WAPIs. (No events
> either, it would mean a major reengineering of an existing WF).
>
> Thanks & regards,
> Mike
--
Kjetil Kilhavn / Vettug AS (http://www.vettug.no)
More information about the SAP-WUG
mailing list