SELECT referenced_entity_name AS table_name, referenced_minor_name as column_name, is_selected, is_updated, is_select_all  
FROM sys.dm_sql_referenced_entities ('LapBuL.AbsensiLaporanBulananSRO', 'OBJECT');  -- stored procedure

SELECT * 
FROM sys.dm_exec_describe_first_result_set_for_object(
    OBJECT_ID('LapBuL.AbsensiLaporanBulananSRO'), 
    0
    );

EXEC sp_describe_first_result_set 
    @tsql = N'EXEC LapBuL.AbsensiLaporanBulananSRO 2021, 3, 1',
    @params = null,
    @browse_information_mode = 1;

SELECT TOP 0 * INTO #TempTable 
FROM OPENROWSET(
    'SQLNCLI', 
    'Server=localhost;Trusted_Connection=yes;', 
    'EXEC LapBuL.AbsensiLaporanBulananSRO 2021, 3, 1');
EXEC('USE tempdb EXEC sp_columns #TempTable DROP TABLE #TempTable');

