SAP_WAPI_START_WORKFLOW vs. SWW_WI_START

Kjetil Kilhavn kjetil.kilhavn at bluec.no
Wed Apr 16 10:46:23 EDT 2008


On Wednesday 16 April 2008 16:07:25 Sample, Rick wrote:
> Mike, I tried several different approaches to what I 'think' you are
> saying, but WF still does not start.
> Below is a Y test snip. Can you point out what you mean?
First of all you are using an incorrect container definition....

Second, don't use the macros, just append the lines directly in the container 
table with the same element name, e.g. 
DATA: lt_wfcontainer TYPE STANDARD TABLE OF swr_cont,
      l_containerline LIKE LINE OF lt_wfcontainer[],
      bapi_return     TYPE bapiret2.

l_containerline-element = 'BAPI_Return'.

bapi_return-type    = 'W'.
bapi_return-message = '1'.
l_containerline-value = bapi_return.
APPEND l_containerline TO lt_wfcontainer[].

bapi_return-type    = 'S'.
bapi_return-message = '2'.
l_containerline-value = bapi_return.
APPEND l_containerline TO lt_wfcontainer[].
CLEAR l_containerline.

>
> FUNCTION y_test_start_dla_msg.
>   INCLUDE: <cntn01>.
>
>   DATA:
>    container        TYPE swcont OCCURS 0 WITH HEADER LINE,
>    return_code     TYPE sy-subrc,
>    workitem_id     TYPE swr_struct-workitemid,
>    bapi_return      TYPE bapiret2 OCCURS 0 WITH HEADER LINE.
> *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>   bapi_return-type    = 'W'.
>   bapi_return-message = '1'.
>   APPEND bapi_return.
>
>   bapi_return-type    = 'S'.
>   bapi_return-message = '2'.
>   APPEND bapi_return.
>
>   swc_set_table container 'BAPI_Return' bapi_return.
>
>   CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
>        EXPORTING
>             task            = 'TS90000212'
>        IMPORTING
>             return_code     = return_code
>             workitem_id     = workitem_id
>        TABLES
>             input_container = container.
>
> ENDFUNCTION.
>
> -----Original Message-----
> From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf
> Of Mike Pokraka
> Sent: Wednesday, April 16, 2008 2:40 AM
> To: SAP Workflow Users' Group
> Subject: Re: SAP_WAPI_START_WORKFLOW vs. SWW_WI_START
>
> Hi Rick,
> Just repeat the same container element name with different values for
> the
> SAP_WAPI container.
> Cheers,
> Mike
>
> On Tue, April 15, 2008 10:47 pm, Sample, Rick wrote:
> > I forgot that the interface changed for SAP_WAPI_START_WORKFLOW. We
>
> can
>
> > no longer pass in 'tables' to this FM?
> >
> > What I need is, to start a WF and pass in TABLES.
> >
> > What are the risks of using SWW_WI_START? Or, how do I pass in tables
>
> to
>
> > the
> > new WAPIs?
> >
> > Rick Sample
> > SAP Business Workflow Developer
> > Graybar, Inc.
> >
> > _______________________________________________
> > 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
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug



-- 
Kjetil Kilhavn (+47 40220607)
Blue Consulting AS (http://www.bluec.no/)



More information about the SAP-WUG mailing list