Looks to me as if you are trying to use the in-memory table "@tIDs" as the recipient for the REPORT_CUBE_ID column within the cursor ("fetch next from PHCursor into @tIDs"). The recipient variable for the value of REPORT_CUBE_ID should be defined as the same data type as REPORT_CUBE_ID.
Not too sure what you are doing on the next line either; but it looks like you are trying to get back the REPORT_CUBE_ID value from the same table @tIDs?
Assuming REPORT_CUBE_ID is an integer, define @tIDs as an integer also and then when you "fetch next from PHCursor into @tIDs", @tIDs will contain the value of REPORT_CUBE_ID for the current cursor row and you will not need to then access it with @iCurrID.
Better still, "fetch next from PHCursor into @iCurrID" and get rid of @tIDs altogether.