After some googling I found two solutions:
1. use a dummy select statement as the first select statement in your procedure to provide the metadata:
ALTER procedure [dbo].[up_test]
as
begin
set nocount on
if 1=0
begin
select cast('A' as varchar(1)) as A
end
select 'A' as A into #temp
select * from #temp
drop table #temp
end
2. Use table variables instead of temporary tables
ALTER procedure [dbo].[up_test]
as
begin
set nocount on
declare @temp table (A varchar(1))
insert into @temp values ('A')
select * from @temp
end
Peter