Check for existing Database Entry in background
I have a problem and hopefully someone here can help me solving it. On our system there's a function that creates a Database Entry from a given file, as soon as this file is stored in a special directory and the file is correct. This can take several seconds. I have a FM which stores the file automatically in this directory. Now i need a function to check, if the Database Entry is generated, and to return this Entry. Because this can take some seconds, I want this to run in background so it doesn't affect my foreground processes and the GUI. How can I manage this? I tried CALL FUNCTION fm DESTINATION 'NONE' but this will stop my foreground processes for several seconds and also doesn't allow me to import parameters from the FM. Also SUBMIT rp AND RETURN will stop my foreground processes.
So, does anyhove has an idea to run this function in background not stopping my foreground process but letting the foreground process know, when the Entry is generated?