Event Parameter - Object

Dart, Jocelyn jocelyn.dart at sap.com
Tue Jul 9 21:09:55 EDT 2002


Hi Rodrigo,
In your statement:
 
  SWC_CREATE_OBJECT MATERIAL 'BUS1001006' 'Testing'.
 
'Testing' should be replaced by the object key, i.e. the material number
IN THE CORRECT FORMAT.  That is you need to move the
material number into a variable defined with TYPE MARA-MATNR.
This is necessary because the material number has a conversion exit on
it - so just passing a material number won't work if the system thinks
it is not in the correct format.
 
e.g.
DATA: Material_key type mara-matnr.
 
Move 'Testing' to material_key.
swc_create_object MATERIAL 'BUS1001006' material_key.
 
Otherwise your code looks fine.  If you are still having
problems passing the event parameter after you have made the
adjustments, try checking SY-SUBRC after swc_create_object and
swc_set_element to check that both statements are working without
error.  Also try using the macro to convert the container from runtime
to persistent before calling the function module.
 
Regards,
Jocelyn Dart
SAP Australia (SRM, EBP, Workflow)
Ph: +61 412 390 267
e-mail: jocelyn.dart at sap.com
 
 
 
 
-----Original Message-----
From: Flavio Oliveira [mailto:oliveiraflavio at hotmail.com]
Sent: Friday, 5 July 2002 6:18 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Event Parameter - Object
 
 
Rodrigo:
 
What I normaly do is create the parameter inside the Receiver function
module (SWE2).
 
When the event is created, this function is called and, as the code to
create the parameter value is in there, the parameter is filled when the
event is created. Try this...
 
Flavio.
 
 
>From: "Marques Rodrigo (RBBR/ASE61) *" <Rodrigo.Marques at br.bosch.com>
>Reply-To: SAP Workflow Users' Group <SAP-WUG at MITVMA.MIT.EDU>
>To: SAP-WUG at MITVMA.MIT.EDU
>Subject: Event Parameter - Object
>Date: Thu, 4 Jul 2002 15:42:19 -0300
>
>Hello Folks,
>
>I am triggering an event from a field-exit using the following code
>
>   DATA: BEGIN OF ROTEIRO_KEY,
>             GRUPO LIKE PLKO-PLNNR,
>             COUNTER LIKE PLKO-PLNAL,
>         END OF ROTEIRO_KEY.
>   DATA: MATERIAL TYPE SWC_OBJECT.
>   DATA: OBJECT_KEY LIKE SWEINSTCOU-OBJKEY.
>   SWC_CONTAINER  EVT_CONTAINER.
>
>   SWC_CREATE_OBJECT MATERIAL 'BUS1001006' 'Testing'.
>
>   SWC_SET_ELEMENT EVT_CONTAINER 'Material' MATERIAL.
>
>   ROTEIRO_KEY-GRUPO = '50040503'.
>   ROTEIRO_KEY-COUNTER = '1'.
>
>   OBJECT_KEY = ROTEIRO_KEY.
>
>   CALL FUNCTION 'SWE_EVENT_CREATE_FOR_UPD_TASK'
>        EXPORTING
>             OBJTYPE         = 'ZBUS1012'
>             OBJKEY          = OBJECT_KEY
>             EVENT           = 'ROUTINGCREATED'
>        TABLES
>             EVENT_CONTAINER = EVT_CONTAINER
>        EXCEPTIONS
>             OTHERS          = 01.
>
>My problem is...
>The parameter Material of the event container is defined as Object type
>BUS1001006.
>How do I set the value of that parameter before creating the event?
>It won4t work if I just pass the material number.
>
>Thanks in advance for your attention
>
>Rodrigo Marques
>Robert Bosch Brazil
 
 
 
 
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
 


More information about the SAP-WUG mailing list