Here is an example from SHINE. The Call is basically the same in the scripted calculation view. Main difference is the output parameter gets named instead of the ?. In the SHINE example we have some intermediate SQL and then pass that result into the input of the procedure as well.
/********* Begin Procedure Script ************/
BEGIN
var_rank =
select company_name, region, sales, orders, sales_rank, order_rank from(
select "CompanyName" as company_name, "Region" as region, sum("NETAMOUNT") as sales, count("SALESORDERID") as orders,
dense_rank() over ( order by sum("NETAMOUNT") desc ) as sales_rank,
dense_rank() over ( order by count("SALESORDERID") desc ) as order_rank
from "sap.hana.democontent.epmNext.models::AN_SALES_ORDER_RANKING"
where date_sql between :IP_FR_DTE and :IP_TO_DTE
and "Region" = :IP_REGION
group by "CompanyName", "Region"
order by sales_rank, "CompanyName"
)
where sales_rank < 11;
CALL "_SYS_BIC"."sap.hana.democontent.epmNext.models/DT_CUSTOMER_DISCOUNT_CALCULATION" (:var_rank, var_out);
END /********* End Procedure Script ************/