Hello Yujun,
DDL statements are not allowed in Read-Only procedures., there is a config parameter in indexserver.ini config file sqlscript_mode that needs to be set to 'UNSECURE' to allow non-read-only procedures. Please check SAP Note: 1994104
Please also note that dynamic SQL in SQL Script procedures makes the procedure vulnerable to SQL injection. There is a section on SQL Script security considerations in HANA SQL Script reference guide.
HTH
Gopal