by Lorenz Alder, Senior Consultant / Software Architect

Ever wanted to build a menu processor and tried to figure out how to call functions by the function names stored in the database? Here’s what you need to know:

  1. Create a prototype function defining input and output parameters for callees
  2. Let all functions you want to dynamically call to inherit from the prototype function
  3. Create a caller function and define fields for Source Code parameters
  4. Caller sets function name from values (simulating DB access). Implementation name of the function and the full function name including the package structure are needed. (“Function1”, “App.UI.Function1” in the example) We also add a dummy call to the prototype function and map input/output parameter to local variable LocalParmsL.
  5. Subroutine “Dynamic Call” sets necessary paramters for the source code
  6. Formatting parameters for Source Code with Messages
  7. Source Code: DynamicCall
  8. Parameters for Source Code
  9. Parameter mapping for Source Code: DynamicCall

If there are any questions regarding this post please feel free to contact me at