SAP_WAPI_START_WORKFLOW

Mike Pokraka wug at workflowconnections.com
Wed Mar 11 20:01:04 EDT 2009


Andy, 

 

You should also be able to use a structure of type SIBFLPORB. Regarding your
question of being able to start a WF using OO, the quick way is to have a
look in the code of SAP_WAPI_START_WORKFLOW. Given all the stuff needed to
do I'd say it's not worth the effort unless you have a good reason to.

 

Cheers, 

Mike

 

 

From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of
Andy Curtis
Sent: 11 March 2009 11:02
To: SAP Workflow Users' Group
Subject: Re: SAP_WAPI_START_WORKFLOW

 

Rick

 

I got it working today.  I had to change it a little though to get it to
recognise BUS2121 as a Business Object, so needed to redefine
lv_object_instance

 

DATA: BEGIN OF lw_object_instance,

  c_1 TYPE char1 VALUE '[',

  catid TYPE sibfcatid VALUE 'BO',

  c_2 TYPE char1 VALUE '.',

  typeid TYPE sibftypeid,

  c_3 TYPE char1 VALUE '.',

  instid TYPE sibfboriid,

  c_4 TYPE char1 VALUE ']',

END OF lw_object_instance.

CL_SWF_IO_SERVICES=>CHECK_ALL needed this 

 

Andy



 

On 3/10/09, Rick Bakker <rbakker at gmail.com> wrote: 

Yes.

INCLUDE <CNTN01>.

data: lv_rc like sy-subrc.
data: lt_messages type standard table of SWR_MESSAG.

data:
begin of lv_object_instance,
  objtype type swo_objtyp,
  objkey  type swo_typeid,
end of lv_object_instance.

* Define the container
swc_container lt_wf_cont.

* Create the container
swc_create_container lt_wf_cont.
* Clear the container (not necessary here)
swc_clear_container lt_wf_cont.

lv_object_instance-objtype = 'FORMABSENC'.
lv_object_instance-objkey = '0000000088'.

lt_wf_cont-element = 'ABSENCEFORM'.
lt_wf_cont-value = lv_object_instance.
append lt_wf_cont.

CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
EXPORTING
   TASK                     = 'WS30000015'
*   LANGUAGE                 = SY-LANGU
   DO_COMMIT                = 'X'
*   USER                     = SY-UNAME
*   START_ASYNCHRONOUS       = ' '
*   DESIRED_START_DATE       =
*   DESIRED_START_TIME       =
*  IMPORTING
   RETURN_CODE              = lv_rc
*    WORKITEM_ID              = lv_wfid
*    NEW_STATUS               = lv_wistat
TABLES
   INPUT_CONTAINER          = lt_wf_cont
   MESSAGE_LINES            = lt_messages
*   MESSAGE_STRUCT           =
*   AGENTS                   =
         .


On 3/10/09, Andy Curtis <abcurtis at gmail.com> wrote:
> has anyone successfully used SAP_WAPI_START_WORKFLOW with a Container
> Element that is a Business Object and not a simple variable?
>
> --
> Andy Curtis
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>
>
_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug




-- 
Andy Curtis
(m) 07798 603099 
(t) 01737 843948 
(e) abcurtis at gmail.com 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20090312/592ec2e7/attachment.htm


More information about the SAP-WUG mailing list