[46C] SAP_WAPI_CREATE_EVENT works fine in Dev - no eventcreated inQA system

Mike Pokraka wug.replies at workflowconnections.com
Wed Jul 27 04:42:14 EDT 2005


Hi Kjetil,
I missed the evetn queue bit in your original post.... perhaps because you
didn't mention it?
It makes perfect sense though. Have a look in the system log (SM21) -
you'll most likely see a rollback happening when using the queue.
This may be a bug in the event queue, if the event is published straight
away it can all go in the same LUW. Perhaps the rest of the LUW expects
the event to have happened (HR is weird!) and decides to rollback if it
doesn't find it. It might be worth reporting if you don't come up with a
definite answer.

As a test, do the nasty thing and put a COMMIT WORK statement after the
SAP_WAPI function call. Or - now that you can reproduce it in dev - try
one of the SWE_EVENT... FM's.

Cheers
Mike

Kjetil Kilhavn wrote:
> That is what annoys me too (see last paragraph of my previous message) -
> I don't understand why it doesn't work with the event queue.
>
> I think the problem is related to the way my function module which
> creates the event is called. It is called from within HR while
> processing infotype data. I am not sure if it is an "in update module"
> call, and right now I won't bother to check it. I'll wait until the guy
> who programmed the HR part is back from holidays.
>
> When the same function module is called from another program everything
> works fine also with the event queue on. Therefore I will blame it all
> on the HR people until they prove themselves "not guilty" :-)
> --
> Kjetil Kilhavn, Statoil KTJ IT BKS
>
>
> -----Original Message-----
> From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf
> Of Mark Pyc
> Sent: 27. juli 2005 09:56
> To: SAP Workflow Users' Group
> Subject: Re: [46C] SAP_WAPI_CREATE_EVENT works fine in Dev - no event
> created inQA system
>
> Congrats on finding the difference between DEV and QA, but it doesn't
> really answer the problem does it? Should the Event Queue behave
> differently for an event raised by the application versus one raised by
> SWUE?? Does SWUE automatically bypass the Queue??
>
> Just curious.
>
> On 7/27/05, Kjetil Kilhavn <KJETILK at statoil.com> wrote:
>> Argh! The reason it worked fine in Dev is that the event queue was
>> turned off there. Needless to say, it is not turned off any longer.
>> --
>> Kjetil Kilhavn, Statoil KTJ IT BKS
>>
>> ________________________________
>> From: Kjetil Kilhavn
>> Sent: 27. juli 2005 09:19
>> To: 'SAP Workflow Users' Group'
>> Subject: RE: [46C] SAP_WAPI_CREATE_EVENT works fine in Dev - no event
>> created inQA system
>>
>>
>>
>>
>> Thanks for the beer update Mark :-)
>> No, I didn't debug SWE_EVENT_CREATE with the START_RECFB_SYNCHRON flag
>
>> set, since SAP_WAPI_CREATE_EVENT doesn't specify a value for that
>> parameter in its call (and the default is space).
>>
>> The lack of signs of problems is what is so strange. There are no
>> short dumps. There are no tRFC problems. I didn't check SM13
>> yesterday, but I did now and there is nothing. I tried turning the SQL
>
>> and RFC trace on too
>> (ST05) yesterday, but I couldn't find anything very strange there
> either.
>> However, I am not an expert at interpreting traces. I assume that when
>
>> RC is zero things are fine :-)
>>
>> What I find there is that after the call to SWW_WI_TO_OBJECT_FIND
>> (revealed by a SWWVCONTWI fetch) there are a few statements that
>> probably should have done the trick. The text lines are quite long, so
>
>> I chose to include it as a picture. It is rather big unfortunately.
>>
>> Just to "confirm my worst fear" I turned off the event queue for the
>> linkage, and then it immediately worked as it should - the event
>> appears in the log and the workflow starts. I suppose that will be the
>
>> way to go then, at least right now. I don't like it since another
>> solution creates quite a few of these events in a short time frame.
>> And by definition I don't like it since I don't understand why the
>> other solution doesn't work :-)
>> --
>> Kjetil Kilhavn, Statoil KTJ IT BKS
>>
>>
>>
>> -----Original Message-----
>> From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On
>> Behalf Of Mike Pokraka
>> Sent: 26. juli 2005 16:47
>> To: SAP Workflow Users' Group
>> Subject: Re: [46C] SAP_WAPI_CREATE_EVENT works fine in Dev - no event
>> created inQA system
>>
>> Hi Kjetil,
>> Sounds more sinister than straight workflow/ABAP. Some of these may be
>
>> obvious, but there are always trees in a forest:
>>
>> Short dumps?
>> SM13 - Update failures?
>> stuck in SM58
>> Might be worth poking around the system log.
>>
>> Cheers
>> Mike
>>
>> Kjetil Kilhavn wrote:
>> > I have never been bothered by a stranger problem I think. A workflow
>
>> > solution has to be developed for approval of access to buildings,
>> > which uses a custom infotype in HR. Anyway, the code for the
>> > infotype calls a function I have written, and in my function I have
>> > a call to SAP_WAPI_CREATE_EVENT.
>> >
>> > Everything is fine in development, the function is called,
>> > SAP_WAPI_CREATE_EVENT is called and returns successfully (at least
>> > one receiver found), the event log displays the entry and the
>> > workflow starts.
>> >
>> > In Quality Assurance the function is called, SAP_WAPI_CREATE_EVENT
>> > is called and returns successfully (at least one receiver found),
>> > and the event log displays ... nothing, nada, nix. Naturally the
>> > workflow does not start.
>> >
>> > Using SWUE to create the event in QA works like a charm. The event
>> > log displays the entry and the workflow starts.
>> >
>> >
>> > I've been trying to figure out what the problem is and making minor
>> > changes in the code. Nothing has helped so far, and it is a bad idea
>
>> > to change code which works (it works in the development system at
>> > least). I have tried both with and without commit_work, and it makes
>
>> > no difference that I am able to observe.
>> > --
>> > Kjetil Kilhavn, Statoil KTJ IT BKS
>>
>>
>> Mike Pokraka
>> Senior Consultant
>> Workflow Connections Ltd.
>> Mobile: +44 (0)7786 910 855
>
>
> -------------------------------------------------------------------
> The information contained in this message may be CONFIDENTIAL and is
> intended for the addressee only. Any unauthorised use, dissemination of
> the
> information or copying of this message is prohibited. If you are not the
> addressee, please notify the sender immediately by return e-mail and
> delete
> this message.
> Thank you.
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>


Mike Pokraka
Senior Consultant
Workflow Connections Ltd.
Mobile: +44 (0)7786 910 855


More information about the SAP-WUG mailing list