Is it possible to unload a program at runtime?
maybe you can help solve the following problem:
I have a customer program that is calling a sap standard function module several times. The function module is BAPI_BUPA_ADDRESS_ADD. The BAPI works fine when calling it once but I get errors when repeating the call.
I assume that the error is caused by the fact, that the data of the respective function group is no longer initial after the first call. Of course this would be a programming error. My assumption is approved by a workaround: When I call the function module in a separate work process with "starting new task" I observe no errors.
Now I wonder if there is a better workaround because starting a new task for each call has the disadvantage of making each call asynchronous - moreover we create many work processes. For example is there a way to unload or refresh a function group at runtime so that the second call is like the first?
Thomas Zloch replied
Time to make use of the SAP Service Marketplace. I did this for you by searching for BUPA_ADR_WRITE_DOCUMENT and found this [SAP Note 1256410|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1256410]. See if this helps.