Creating a batch job via RFC: We want to use a function module to create a batch job in SAP. This function works fine in the SE37 test environment but when we call it from a GuiXT script no batch job is scheduled. What could be the reason?

You need a "Commit work" statement at the end of the function. The commit is not performed automatically at the end of a function which has been called via RFC.