qRFC sending multiple records to WebMethods

Question: Hi Everyone,

We have a method before_update on transaction cj20n, to send the creation of a new project to webmethods.

They used to call the remote function as synchronous and WedMethods would get only 1 record. But they now want to use a qRFC because when WebMethods was down, we would need to resend everything manually. So by using qRFC, it would be retried with a batch job.

The problem is this, when we put in the qRFC, WebMethods now gets 3 records. The 1st one is full and complete and creates the project. The other 2 records only have the transaction ID in it and a State. The state for the complete record is 0. The state for the second record is 1 and the state of the last record is 2. We dont know why we are getting those 2 empty records.

Another point is that WebMethods is getting 3 records when its up and it is also getting 3 records when it is down and we resend it to WebMethods.

But when we were sending it as a synchronous RFC, it would only get the 1 complete record.

Do you think its because we are calling the qRFC within a before_update method? I tried removing the commit work after the call function and it still sends the 3 records to WebMethods.

Here is the code...

l_name = 'Project'.

Call Function 'TRFC_SET_QUEUE_NAME'
exporting
qname = l_name.

Call Function 'function name'
in background task
destination l_dest
exporting
im_zcreateproject = g_createproject.

Commit work.


Does WebMethods need to do something to filter the records it gets to remove the empty ones?

I am running out of ideas...

I also tried to call Function TRFC_QUEUE_INITIALIZE just before the function TRFC_SET_QUEUE_NAME. I still get the same results.

Any ideas will be greatly appreciated!

Thanks!

Answer:
Hi,

you should use IDOCs for asynchronous message.

Be carefull when using commit work inside userexit and BADI...

A better solution is to call your function 'function name' in update task and then no need to call a commit work.

SSII
_________________
SSII is back
Copyright ?2007 - 2008 www.jt77.com