I am facing exactly the same problem in a SQL-procedure.
drop procedure Z_PROC_V1;
create procedure Z_PROC_V1(
in i_tenant_id NVARCHAR,
out o_result RESULT_TYPE
) reads sql data
as
begin
o_result = select * from MY_VIEW WITH PARAMETERS ('placeholder' = ('$$i_tenant_id$$', ''':i_tenant_id'''));
end
call Z_PROC_V1( '0001', o_result =>? );
select * from MY_VIEW WITH PARAMETERS ('placeholder' = ('$$i_tenant_id$$', '0001'));
Once I call the SELECT statement directly, then I get a result set.
Once I call the Procedure, I get an error message:
SAP DBTech JDBC: [257]: sql syntax error: [257] sql syntax error: incorrect syntax near ":i_tenant_id": line 2 col 94 (at pos 202)Please check lines: 8,
If I try to create the procedure like this:
drop procedure Z_PROC_V1;
create procedure Z_PROC_V1(
in i_tenant_id NVARCHAR,
out o_result RESULT_TYPE
) reads sql data
as
begin
o_result = select * from MY_VIEW WITH PARAMETERS ('placeholder' = ('$$i_tenant_id$$', :i_tenant_id));
end
I get a SQL error during createion of the procedure:
SAP DBTech JDBC: [257] (at 235): sql syntax error: incorrect syntax near ":i_tenant_id": line 8 col 99 (at pos 235)
Does anyone have the solution for this problem?