Different structure of container

Dart, Jocelyn jocelyn.dart at sap.com
Tue Nov 18 17:21:28 EST 2003


Venkat,
You don't need to fill the event container with the main object type and key in this way.
Just use the object type and object key parameters to pass TRAVELREQ and your travel number.
You have given the object instance twice effectively which might be what is confusing it.
If there's nothing else you need to pass just leave event_container empty.
Check that you have the right number of leading zeroes in your object key - the length of the
key you have given in your example is 9.  Most keys are 8 or 10 ?
Jocelyn
 
 
-----Original Message-----
From: Venkat S Raman [mailto:Venkat_S_Raman-NR at raytheon.com]
Sent: Wednesday,19 November 2003 7:51 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Different structure of container
 
 
Hi Jocelyn:
 
The WAPIs (both START_WORKFLOW and SAP_WAPI_CREATE_EVENT) need an object
instance and I cannot make the WAPIs work .
 
Here is a simple workflow (supplied  by SAP in WAS 6.2 for Webflow)  for
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 = 'TRAVELREQ'.
ls_object-objtype = 'TRAVELREQ'.
ls_object-objkey  = '000000072'.
event_container-value = ls_object.
append event_container.
 
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
  EXPORTING
    OBJECT_TYPE           = 'TRAVELREQ'
    OBJECT_KEY            = '000000072'
    EVENT                 = 'CREATED'
    COMMIT_WORK           = 'X'
    EVENT_LANGUAGE        = SY-LANGU
  IMPORTING
    RETURN_CODE           = lv_return_code
    EVENT_ID              = lv_event_id
  TABLES
    INPUT_CONTAINER       = EVENT_CONTAINER
*   MESSAGE_LINES         =
*   MESSAGE_STRUCT        =
 
.
 
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 works
fine!!!!
 
Thanks
Venkat
 
 
 
                      "Dart, Jocelyn"
                      <jocelyn.dart at sap.c         To:      SAP-WUG at MITVMA.MIT.EDU
                      om>                         cc:
                      Sent by: SAP                Subject: Re: Different structure of container
                      Workflow
                      <Owner-SAP-WUG at MITV
                      MA.MIT.EDU>
 
 
                      11/17/2003 03:37 PM
                      Please respond to
                      "SAP Workflow
                      Users' Group"
 
 
 
 
 
 
Hi Werner,
That's correct. The WAPIs use a simplified form of the container so that
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 for
the value which contains logical system followed by business object type
followed by business object key. However you only need to enter business
object type and key for  it to work. Someone else may be able to confirm
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 Kv_l [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 like
swcont (fields name, tab_index, elemlength, type, value).
When i pass my report container to the FM container, the values are filled
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