1.Is it possible to use ref cursors in forms6i

DECLARE

TYPE M_REF_CUR IS REF CURSOR;

M_REF M_REF_CUR;
M_DOC_DT VARCHAR2(15);
SQL_STMT VARCHAR2(3000);

BEGIN

SQL_STMT := 'SELECT '||M_DOC_DT||' FROM '||PT_VAR_ALLW_HEAD ;

OPEN M_REF FOR SQL_STMT;
LOOP
FETCH..........................

END LOOP;
CLOSE M_REF;

This is the error
Encountered the symbol "select expecting" one of the following