We are on 4.6C. The scenario is, when you do Goods Receipt via MIGO transaction, for some materials it has to do...
auto Goods Issue. For this I have created a BDC program and attached it to my business object. It works fine when I test it, but when I used the same method in a task (I assigned it as a synch method and as a background job) the workitem always remains the status "In Process". I came to know it requires some type of terminating event at this point. My question is, is it necessary to raise an event? Can't the system create it automatically once the BDC is over?
I am not sure that your analysis is correct there. If the method that you have written is marked as a synchronous method, I do not see why it needs a terminating event. Check whether the Goods Issue is actually being done? Is a short dump created (this is a common cause of methods hanging)? Also make sure that the BDC is not issuing some sort of Popup which causes the method to hang. What mode are you running the BDC? Ensure that you are running it in 'N' mode so that if error messages are issued they will not halt the BDC.
As a general rule, I avoid BDC's like the plague for two simple reasons. It leaves us at the mercy of SAP; that is if SAP changes their Screens (or renames a field) then the method stops working. This is hardly robust. Finally, I avoid BDCs because of the performance implications. They are much more process intensive than executing the code directly.
There is no doubt that BDCs have their place but I would suggest you think about your approach.
Dig Deeper on SAP workflow development
Related Q&A from Alon Raskin
Find out how to configure clients so that the same version of an SAP workflow item is used when the workflow is triggered in separate clients. Continue Reading
An SAP user has created a user decision step in an SAP workflow item and wants to know how an end user can send an attachment to other users. Continue Reading
A SearchSAP.com reader wants to know how to hide the forward button in an SAP Business Workplace toolbar. Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.