cancel
Showing results for 
Search instead for 
Did you mean: 

Debugger not showing output in SP09

Saurabh_Tiwari
Employee
Employee
0 Kudos


Hi,

I have written a test procedure using development perspective. (I think only procedures created via development perspective can be debugged, kindly correct if I am wrong).

Procedure is as below -

PROCEDURE "A"."A::get_product_sales_price_st"

(IN productid NVARCHAR(10),

OUT out_tt table (prodid nvarchar(10), price decimal(15,2))

)

       LANGUAGE SQLSCRIPT

       SQL SECURITY INVOKER

       --DEFAULT SCHEMA
<default_schema_name>

       READS SQL DATA AS

BEGIN

/*****************************

       Write
your procedure logic

*****************************/

declare v_l1 nvarchar(2) := :productid;

out_tt = select :v_l1 as prodid, 1.5 as price from dummy;

END;

When I call this procedure in SQL console, I can see the output.

call "A"."A::get_product_sales_price_st"('A',?)

But when I debug procedure in debug perspective, it shows me values of input parameters, but NOT of Output.

Any idea, why debugger not showing value of out_tt and why it is terminating at the end?

Thanks for the reply.

Best Regards,

Saurabh

Accepted Solutions (0)

Answers (1)

Answers (1)

Saurabh_Tiwari
Employee
Employee
0 Kudos

Hi,

Any answer to question? Why output values are not being displayed in debugger?

Regards,

Saurabh

former_member226419
Contributor
0 Kudos

Hi,

Are you entering value of input parameter at the time of debug in 'Input Parameters'?

BR

Sumeet

former_member226419
Contributor
0 Kudos

Hi,

You can see.

Just write any statement after your last statement.

Please see below screenshot.

BR

Sumeet

Saurabh_Tiwari
Employee
Employee
0 Kudos

Hi Sumeet,

Thanks for your reply.

I added exactly same line below as you have done. But in my case thread is terminating.

please see below images.

Am I missing anything ?

former_member226419
Contributor
0 Kudos

And is it failing at first select statement only?

Ok please do on thing. create one table type first as below : Its a sample table type.

CREATE TYPE SCHEMA_NAME.OUT_TT1 AS TABLE (

prodid nvarchar(10),

price decimal(15,2)

);

then in your procedure do as below and then debug.

create PROCEDURE get_product420

(IN productid NVARCHAR(10),

  OUT out_tt "HANA"."OUT_TT1")

  LANGUAGE SQLSCRIPT

  SQL SECURITY INVOKER

  READS SQL DATA AS

BEGIN

declare v_l1 nvarchar(2) := :productid;

out_tt = select :v_l1 as prodid, 1.5 as price from dummy;

out_tt = select :v_l1 as prodid, 1.5 as price from dummy;

END;