Check below Solution. So you don't have to change logic in inner SP.
Note: This solution will work only if
1. inner SP not contain below statement
2. It will give value of 1 row only, even SP returns multiple rows.
Insert Into #Table
EXEC ....
Script:
Alter PROCEDURE InsertLog
(
@formName nvarchar,
@buttonRout nvarchar,
@buttonName nvarchar,
@clickDateTime DateTime,
@userCode bigint
)
AS
BEGIN
DECLARE @linage nvarchar(30)
Create Table #Result (linage nvarchar(30))
Insert Into #Result
EXEC #GetLinage @formName
Select @linage = linage From #Result
INSERT INTO
LogTable(
FormName,
Linage,
ButtonRout,
ButtonName,
ClickDateTime,
UserCode
)
Select @FormName, @Linage, @ButtonRout, @ButtonName, @ClickDateTime, @UserCode