The issue lies in the class you are using for making a method call. This class is basically making RFC callback with the help of SAP GUI. SO, when you are using the function builder, it works well because it has an SAP GUI connection present.
But when you are using an external system, the GUI is missing and it doesn’t works.
What you can try is to use some other method which does not have an RFC callback and thus will not have any problem. Try to use ‘create_with_table’ in place of your used method.