Event parameters lost on custom trigger
Rick Sample
Rick.Sample at gbe.com
Thu Sep 23 14:59:07 EDT 2004
While we are on the subject I am converting to WAPIs myself.
I have an object with 2 parms. I kick the event off manually from SWUE and "used" to work fine from here.
I attempted 'SAP_WAPI_CREATE_EVENT' from the FM, passed in the data and executed.
Event triggered but I got a "Feedback after error" and "Event entered in event queue".
Now I can not even kick off the SWUE. I get the same as above.
Do I need to kill what is in queue before I can start again?
4.6c
>>> workflow at quirky.me.uk 9/23/2004 12:31:47 >>>
Ahhhhhhhhhhh, that's it! Grrrr.... one day I'll get used to the SAP_WAPI
way....
OK, the dump was in the swc_set_element ... macro. Silly me, I see
container, I think container macros - not that it would be an obvious
thought.
At least that's how SWE_EVENT_CREATE used to work, and looking at the docs
for SAP_WAPI_CREATE_EVENT it's all described.
Thanks for that, it works now.
Cheers
Mike
Heath, Darrell L. wrote:
> Now you have me curious. I just checked my 4.7/6.2 system and
> 'SAP_WAPI_CREATE_EVENT' expects a table of structure SWR_CONT. This
> structure only has two character fields in it (ELEMENT, VALUE). Where
> as the structure, SWCONT, used for the SWC_CONTAINER/SWC_SET_ELEMENT has
> ELEMENT, TAB_INDEX, ELEMLENGTH, etc.
>
> Is your short dump caused by the function call?
>
> Darrell
>
> -----Original Message-----
>> From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU] On Behalf Of
> Michael Pokraka
> Sent: Thursday, September 23, 2004 11:56 AM
> To: SAP-WUG at MITVMA.MIT.EDU
> Subject: Re: Event parameters lost on custom trigger
>
> Whoops, no, that short dumps with a type conflict. It was also why I
> used
> the swc_container macro to declare it.
> Thanks for the input,
> Cheers
> Mike
>
> Heath, Darrell L. wrote:
>> Michael,
>>
>> Check the format of lt_cont. At least in 4.5b 'SAP_WAPI_CREATE_EVENT'
>> uses the structure SWR_CONT rather than SWCONT (created by
>> swc_container).
>>
>> Darrell
>>
>> -----Original Message-----
>>> From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU] On Behalf Of
>> Michael Pokraka
>> Sent: Thursday, September 23, 2004 11:26 AM
>> To: SAP-WUG at MITVMA.MIT.EDU
>> Subject: Event parameters lost on custom trigger
>>
>> Hi all,
>> Been tearing my hair out for two days on this one:
>> I'm raising an event using SAP_WAPI_CREATE_EVENT and trying to pass
>> parameters to the WF, which I've done in the past no problem. However
> on
>> this 4.7/620 system it doesn't like to play along.
>>
>> The code is quite straightforward:
>>
>> include <cntn01>. " also tried <cntain>
>> swc_container lt_cont.
>> swc_create_container lt_cont.
>> swc_set_element lt_cont 'EventParameter' p_value.
>>
>> * Also tried SWE_EVENT_CREATE with no joy
>> CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
>> EXPORTING
>> OBJECT_TYPE = 'BUS0000'
>> OBJECT_KEY = l_objkey
>> EVENT = 'ZCUSTOMEVENT'
>> TABLES
>> INPUT_CONTAINER = lt_cont.
>>
>> Result? There's no hint of any event parameter in the WF. If I test it
>> using
>> SWUE, the parameter comes through to the flow. I've debugged some of
> the
>> event code and somwehow it just seems to lose the custom value along
> the
>> way, I'm still working my way through the 497 classes that seem to be
>> involved (and have searched the archives and OSS), but if anyone can
>> shed
>> some light in the meantime I'd be grateful.
>>
>> Cheers
>> Mike
>>
>>
>
>
More information about the SAP-WUG
mailing list