on 07-25-2018 3:23 PM
Dear all,
I am trying to call table function in same function. I am getting error as
Dependent object not found: SqlScript; SYSTEM.public::ZCO_TF_STDCOST_SUB: symbol not found. I tried to search for workarounds. Could you please suggest/ or any other way ? Attaching code snippets below.
FUNCTION "SYSTEM"."public::ZCO_TF_STDCOST_SUB" ( in IT_INPUT table ( ...) ,IN lv_matnr varchar(40))
RETURNS table (...)
LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER
READS SQL DATA
AS BEGIN
declare cur_ident3 varchar(20);
declare material varchar(40);
DECLARE CURSOR c_cursor3 (cur_ident3 varchar(20)) FOR select *
from :IT_INPUT ;
lt_output = select * FROM "Calc_view" LIMIT 0;
material = :lv_matnr;
for cur_row as c_cursor3(cur_ident3)
do
if cur_row.matnr_1 >= 000000004000000000 and cur_row.matnr_1 <= 000000004000000999 then
lt_temp = select query;
if ::rowcount > 0 then
lt_output = SELECT * FROM "SYSTEM"."public::ZCO_TF_STDCOST_SUB"(:lt_temp, :material) ;
else
lt_output = ce_union_all( :lt_output, :it_input[cur_ident3]) ;
end if;
else
lt_output = ce_union_all( :lt_output, :it_input[cur_ident3]) ;
end if;
END FOR ;
Hmm... is there anything not really way off with this code snippet?
Why don't you just verbally describe what you try to achieve here, since this code is not speaking for itself..
Looping over input tables to select data in a range? Is that a custom way of JOINing?
Using CE-operator for glueing result sets together ... !?
And to answer the question: no, recursive calls are not supported. Replace it with iteration if you must; I've got the feeling you really don't need to, though.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.