IDoc question to wm61 and SAP Adapter 46

I am running on a wm IS 6.1 and SAP Adapter 4.6
Suppose we are sending 1000 iDocs to webMethods SAP Adaper in a daily interface. At some point SAP will finish sending the iDocs but webMethods may still be receiving and processing them. In that case, we are trying to understand our options of how we can let webMethods know we have just sent out last iDoc. Some people recommended sending a trigger or flat file from SAP indicating all iDocs sending is done. Is this the right approach.
What if the trigger says iDoc sending finished, and webMethods still has iDocs in its pipeline. How does this work>

Thanks
SG

why do u assume that wM is waiting for the last IDOC to be sent to start processing?

Adnan

I am not waiting for the last iDoc to start processing .That being said, we have some team members who have raised a question - ‘how will webMethods know when SAP has finished sending the last iDoc , because we need to ultimately generate 1 flat file after processing this whole batch of iDocs which are sent through out the day’.

I understand that as the iDocs reach wm from SAP we can start processing them , create the flat file and as more iDocs come append to this file. But how do we know when the last iDoc came in though?
One alternative is to have a drop dead time, saying all iDocs before this time can get processed, but any other options?

Thanks
SG

If you cant figure out the last IDOC, using time would be a good idea which can be determined looking at the activity level of your SAP system or if you have a timestamp in IDoc you can extract a date or any other meaningful information to figure out which file this idoc belongs to and use the cutoff time to send it across.
Also one other option is to involve a abap developer and figure out if there is a system BAPI you can use to get the idoc queue size from sap system, if zero it means there are no more idocs on sap system waiting to be sent out.
Adnan