It populates this table by inserting the recordset returning by this stored procedure.
IF OBJECT_ID('tempdb..##tmp') IS NOT NULL DROP Table ##tmp
GO
DECLARE @strSQL VARCHAR(MAX)
WITH cte AS (
SELECT 'CREATE TABLE ##tmp(' strSQL
UNION ALL
SELECT strSQL = ',' + name + ' ' + system_type_name
FROM sys.dm_exec_describe_first_result_set_for_object
(OBJECT_ID('myschema.dbo.MyProc'), NULL)
UNION ALL
SELECT strSQL = ')')
SELECT @strSQL = COALESCE(@strSQL, '') + strSQL
FROM cte
WHERE strSQL IS NOT NULL
OPTION (MAXDOP 1);
SET @strSQL = REPLACE(@strSQL,'(,','(');
EXEC (@strSQL);
INSERT INTO ##tmp
EXEC myschema.dbo.MyProc
5512712 --@Field1 INT
....
,NULL; --@FieldN VARCHAR(15)
SELECT * FROM ##tmp;
If you find this script useful please donate generously.