Different structure of container

Venkat S Raman Venkat_S_Raman-NR at raytheon.com
Tue Nov 18 15:51:20 EST 2003


Hi Jocelyn:
 
The WAPIs (both START_WORKFLOW and SAP_WAPI_CREATE_EVENT) need an objec=
t
instance and I cannot make the WAPIs work .
 
Here is a simple workflow (supplied  by SAP in WAS 6.2 for Webflow)  fo=
r
TravelReq.
 
Object Type: TRAVELREQ
Event : CREATED
Object Key: 0000000016
 
Through Event Linkage it should start a workflow.
Here is the program:
 
data: ls_object type SWOTOBJID.
event_container-element =3D 'TRAVELREQ'.
ls_object-objtype =3D 'TRAVELREQ'.
ls_object-objkey  =3D '000000072'.
event_container-value =3D ls_object.
append event_container.
 
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
  EXPORTING
    OBJECT_TYPE           =3D 'TRAVELREQ'
    OBJECT_KEY            =3D '000000072'
    EVENT                 =3D 'CREATED'
    COMMIT_WORK           =3D 'X'
    EVENT_LANGUAGE        =3D SY-LANGU
  IMPORTING
    RETURN_CODE           =3D lv_return_code
    EVENT_ID              =3D lv_event_id
  TABLES
    INPUT_CONTAINER       =3D EVENT_CONTAINER
*   MESSAGE_LINES         =3D
*   MESSAGE_STRUCT        =3D
 
.
 
I get a workflow error - it is looking for the other atrributes of the
Travel Req object like ISSUER.
 
I can use the macros and call the old FM - SWE_EVENT_CREATE and it work=
s
fine!!!!
 
Thanks
Venkat
 
 
                                                                       =
                                                                  =20
                      "Dart, Jocelyn"                                  =
                                                                  =20
                      <jocelyn.dart at sap.c         To:      SAP-WUG at MITV=
MA.MIT.EDU                                                        =20
                      om>                         cc:                  =
                                                                  =20
                      Sent by: SAP                Subject: Re: Differen=
t structure of container                                          =20
                      Workflow                                         =
                                                                  =20
                      <Owner-SAP-WUG at MITV                              =
                                                                  =20
                      MA.MIT.EDU>                                      =
                                                                  =20
                                                                       =
                                                                  =20
                                                                       =
                                                                  =20
                      11/17/2003 03:37 PM                              =
                                                                  =20
                      Please respond to                                =
                                                                  =20
                      "SAP Workflow                                    =
                                                                  =20
                      Users' Group"                                    =
                                                                  =20
                                                                       =
                                                                  =20
                                                                       =
                                                                  =20
 
 
 
 
Hi Werner,
That's correct. The WAPIs use a simplified form of the container so tha=
t
there is no need
to use workflow macros to fill it, in the same way that BAPIs simplify =
data
entry as much as possible.
 
You just fill the container with name and value as you would any other
internal table.
 
There are a couple of tricks to it.  E.g. for multiline elements just
insert a row for each value
with the same container element name.
 
>From memory (which may be faulty...) objects use structure SWOTOBJID fo=
r
the value which contains logical system followed by business object typ=
e
followed by business object key. However you only need to enter busines=
s
object type and key for  it to work. Someone else may be able to confir=
m
this.
Regards,
        Jocelyn Dart
Consultant (SRM, EBP, Workflow)
and co-author of the book
"Practical Workflow for SAP"
SAP Australia
email: jocelyn.dart at sap.com
phone: +61 412 390 267
fax:   +61 2 9935 4880
 
 
 
 
 
-----Original Message-----
From: Werner K=F6=DFl [mailto:werner.koessl at hirschvogel.de]
Sent: Tuesday,18 November 2003 1:34 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Different structure of container
 
 
Hi,
 
i use FM SAP_WAPI_START_WORKFLOW, but the table input_container is like=
 
swr_cont (fields name, value).
And when i create a container in my report with swc_container, it is li=
ke
swcont (fields name, tab_index, elemlength, type, value).
When i pass my report container to the FM container, the values are fil=
led
with tab_index, elemlength, type and value.
How do i get only the value of the container in my report?
 
Thanks!
Werner.
 
 
=
 


More information about the SAP-WUG mailing list