Are you want to create Procedure or Function?
You mentioned Function in Topics header but try to create Procedure (according the mentioned code by you).
If you don't want to create constraints & Indexes then your Procedure is okay without
SQL_STMT := 'CREATE TABLE' || P_TABLE || '(' || COL_SPECS || ')';
you must be put SPACE after 'CREATE TABLE' which is already mentioned in answer of Stew Ashton.
According to what I understood, I tried to mention the solution below.
PROCEDURE
CREATE OR REPLACE PROCEDURE P_DYNAMIC_TABLE (P_TABLE VARCHAR2,
COL_SPECS VARCHAR2)
AS
SQL_STMT VARCHAR2 (2000);
BEGIN
SQL_STMT := 'CREATE TABLE ' || P_TABLE || '(' || COL_SPECS || ')';
EXECUTE IMMEDIATE SQL_STMT;
END P_DYNAMIC_TABLE;
Execute Procedure
EXEC P_DYNAMIC_TABLE('TEST_TBL','COLUMN_1 NUMBER , COLUMN_2 VARCHAR2(100), COLUMN_3 DATE');