I get the same error as cusvenus. The only way I could get the initial view query to run was to comment out references to sys.dm_exec_sql_text, as below.
create view sqlexec as
s.spid,s.dbid,s.login_time,s.hostname, s.loginame, s.program_name,s.waittype,s.lastwaittype,s.cmd,s.blocked,s.cpu,s.memusage,s.physical_io,s.status,s.net_library,s.sql_handle
--,e.text as SQL
--CROSS APPLY sys.dm_exec_sql_text(s.sql_handle) AS e
I'm no expert, but could this be due to a security setting that you have turned on and we don't?
"No pressure, no diamonds." - Thomas Carlyle