Standard BPS functions are executed in foreground when trigerred from Planning folders. Sometimes it is necessary to execute the functions in background when executed from planning folders.
There are couple of options available from SAP about executing the functions as back ground jobs like UPC_BUNDLE_EXECUTE_STEP etc. But all these options are heavy on ABAP side and requires quite a lot of ABAP skills.
This blog will give a simple solution to convert all foreground running functions into background if it is required by the business.
- Create you function which you want to convert into a background run( may be a standard SAP function or FOX function)
- Create another function of type exit
- Create an SE38 program to submit the Job as background run
- Call the SE38 program Inside the Exit Function Module. Use SUBMIT key word to call the SE38 program. The logic of executing the planning function should be written inside the SE38 program using API Execute functions.
- Use Key words JOB OPEN, SUBMIT ans JOB Close for submitting the Program as background run
This way we can make planning Functions run as background jobs. You can see the jobs in SM37 transaction after executing the function.