Hi Christian,
From the PAL Dokumentation (http://help.sap.com/hana/hana_dev_pal_en.pdf)
Step 1 – Create the AFL_WRAPPER_GENERATOR Procedure
Before using any AFL function, you need to create the AFL_WRAPPER_GENERATOR procedure. It is used to generate a wrapper for the AFL functions that take tables with a variable number of columns as inputs. This procedure only needs to be created once by the user SYSTEM.
1. Go to /hanamnt/<SID>/HDB <instance_number>/exe/plugins/afl/ and execute the afl_wrapper_generator.sql script file.
Note
This step needs to be performed each time after the HANA instance is restarted
HTH
--Juergen