You can modify the see_MFG_BASIC_BOM_COSTS proc and add code to move the data from a temp table to a real table inside the company database and point excel to that table. Below is what I added to the proc and saved as a new name. I grab data from other tables in the process. I use ado 2.8 to return the data to excel.
if exists (select * from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'BOM_BASIC_COSTS') drop table TWO.dbo.BOM_BASIC_COSTS
if exists (select * from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'BOM_BASIC_COSTS_DETAIL') drop table TWO.dbo.BOM_BASIC_COSTS_DETAIL
select * into TWO.dbo.BOM_BASIC_COSTS from #BOM_BASIC_COSTS
SELECT dbo.IV00101.ITEMDESC, dbo.BOM_BASIC_COSTS.BOMTYPE_I, dbo.BOM_BASIC_COSTS.EFFECTIVEDATE_I, dbo.BOM_BASIC_COSTS.REVISIONLEVEL_I, dbo.BOM_BASIC_COSTS.FNSHGOOD,
dbo.BOM_BASIC_COSTS.COMPONENT, dbo.BOM_BASIC_COSTS.CMPTDESC, dbo.BOM_BASIC_COSTS.COMPONENT_CHAIN, dbo.BOM_BASIC_COSTS.COMPONENT_OF,
dbo.BOM_BASIC_COSTS.BOMLEVEL, dbo.BOM_BASIC_COSTS.SUBCAT_I, dbo.BOM_BASIC_COSTS.POSITION_NUMBER, dbo.BOM_BASIC_COSTS.MY_POSITION_NUMBER,
dbo.BOM_BASIC_COSTS.QUANTITY_I, dbo.BOM_BASIC_COSTS.FIXEDQTY, dbo.BOM_BASIC_COSTS.UOFMQTY, dbo.BOM_BASIC_COSTS.UOFMFXDQTY, dbo.BOM_BASIC_COSTS.COMPLETE,
dbo.BOM_BASIC_COSTS.DECPLQTY, dbo.BOM_BASIC_COSTS.WCID_I, dbo.BOM_BASIC_COSTS.LOCNCODE, dbo.BOM_BASIC_COSTS.QTYBSUOM, dbo.BOM_BASIC_COSTS.STNDCOST,
dbo.BOM_BASIC_COSTS.UOMSCHDL, dbo.BOM_BASIC_COSTS.BASEUOFM, dbo.BOM_BASIC_COSTS.FIXEDQTYBSUOM, dbo.BOM_BASIC_COSTS.DECPLCUR,
dbo.BOM_BASIC_COSTS.LABCOSTI_1, dbo.BOM_BASIC_COSTS.LABFIXOHDCOSTI_1, dbo.BOM_BASIC_COSTS.LABVAROHDCOSTI_1, dbo.BOM_BASIC_COSTS.MATCOSTI_1,
dbo.BOM_BASIC_COSTS.MATFIXOHDCOSTI_1, dbo.BOM_BASIC_COSTS.MATVAROHDCOSTI_1, dbo.BOM_BASIC_COSTS.MACHCOSTI_1, dbo.BOM_BASIC_COSTS.MACHFIXOHDCOSTI_1,
dbo.BOM_BASIC_COSTS.MACHVAROHDCOSTI_1, dbo.BOM_BASIC_COSTS.LABCOSTI_3, dbo.BOM_BASIC_COSTS.LABFIXOHDCOSTI_3, dbo.BOM_BASIC_COSTS.LABVAROHDCOSTI_3,
dbo.BOM_BASIC_COSTS.MATCOSTI_3, dbo.BOM_BASIC_COSTS.MATFIXOHDCOSTI_3, dbo.BOM_BASIC_COSTS.MATVAROHDCOSTI_3, dbo.BOM_BASIC_COSTS.MACHCOSTI_3,
dbo.BOM_BASIC_COSTS.MACHFIXOHDCOSTI_3, dbo.BOM_BASIC_COSTS.MACHVAROHDCOSTI_3, dbo.BOM_BASIC_COSTS.LABCOSTI_5, dbo.BOM_BASIC_COSTS.LABFIXOHDCOSTI_5,
dbo.BOM_BASIC_COSTS.LABVAROHDCOSTI_5, dbo.BOM_BASIC_COSTS.MATCOSTI_5, dbo.BOM_BASIC_COSTS.MATFIXOHDCOSTI_5, dbo.BOM_BASIC_COSTS.MATVAROHDCOSTI_5,
dbo.BOM_BASIC_COSTS.MACHCOSTI_5, dbo.BOM_BASIC_COSTS.MACHFIXOHDCOSTI_5, dbo.BOM_BASIC_COSTS.MACHVAROHDCOSTI_5, dbo.BOM_BASIC_COSTS.LABCOSTI_7,
dbo.BOM_BASIC_COSTS.LABFIXOHDCOSTI_7, dbo.BOM_BASIC_COSTS.LABVAROHDCOSTI_7, dbo.BOM_BASIC_COSTS.MATCOSTI_7, dbo.BOM_BASIC_COSTS.MATFIXOHDCOSTI_7,
dbo.BOM_BASIC_COSTS.MATVAROHDCOSTI_7, dbo.BOM_BASIC_COSTS.MACHCOSTI_7, dbo.BOM_BASIC_COSTS.MACHFIXOHDCOSTI_7, dbo.BOM_BASIC_COSTS.MACHVAROHDCOSTI_7,
dbo.BOM_BASIC_COSTS.BOMCAT_I, dbo.ICIV0323.MATCOSTI_1 AS PPN_MATCOSTI_1, dbo.ICIV0323.MATCOSTI_3 AS PPN_MATCOSTI_3, dbo.ICIV0323.MATCOSTI_5 AS PPN_MATCOSTI_5,
dbo.ICIV0323.MATCOSTI_7 AS PPN_MATCOSTI_7, dbo.ICIV0323.LABCOSTI_1 AS PPN_LABCOSTI_1, dbo.ICIV0323.LABCOSTI_3 AS PPN_LABCOSTI_3,
dbo.ICIV0323.LABCOSTI_5 AS PPN_LABCOSTI_5, dbo.ICIV0323.LABCOSTI_7 AS PPN_LABCOSTI_7, dbo.ICIV0323.LABVAROHDCOSTI_1 AS PPN_LABVAROHCOSTI_1,
dbo.ICIV0323.LABVAROHDCOSTI_3 AS PPN_LABVAROHCOSTI_3, dbo.ICIV0323.LABVAROHDCOSTI_5 AS PPN_LABVAROHCOSTI_5, dbo.ICIV0323.LABVAROHDCOSTI_7 AS PPN_LABVAROHCOSTI_7,
dbo.ICIV0323.MACHCOSTI_1 AS PPN_MACHCOSTI_1, dbo.ICIV0323.MACHCOSTI_3 AS PPN_MACHCOSTI_3, dbo.ICIV0323.MACHCOSTI_5 AS PPN_MACHCOSTI_5,
dbo.ICIV0323.MACHCOSTI_7 AS PPN_MACHCOSTI_7, dbo.ICIV0323.TOTALCOSTI_1 AS PPN_TOTALCOSTI_1, dbo.ICIV0323.TOTALCOSTI_3 AS PPN_TOTALCOSTI_3,
dbo.ICIV0323.TOTALCOSTI_5 AS PPN_TOTALCOSTI_5, dbo.ICIV0323.TOTALCOSTI_7 AS PPN_TOTALCOSTI_7, dbo.IV00101.STNDCOST AS PPN_STNDCOST,
dbo.IV00101.CURRCOST AS PPN_CURRCOST, dbo.IVR10015.REVISIONLEVEL_I AS PPN_REVISIONLEVEL_I, dbo.IVR10015.EFFECTIVEDATE_I AS PPN_EFFECTIVEDATE_I
into TWO.dbo.BOM_BASIC_COSTS_DETAIL
FROM dbo.IVR10015 INNER JOIN
dbo.IV00101 INNER JOIN
dbo.BOM_BASIC_COSTS ON dbo.IV00101.ITEMNMBR = dbo.BOM_BASIC_COSTS.FNSHGOOD ON dbo.IVR10015.ITEMNMBR = dbo.BOM_BASIC_COSTS.FNSHGOOD INNER JOIN
dbo.ICIV0323 ON dbo.BOM_BASIC_COSTS.FNSHGOOD = dbo.ICIV0323.ITEMNMBR
grant select on TWO.dbo.BOM_BASIC_COSTS to [TRIBRIDGE\KevinLehoullier]
GO