cancel
Showing results for 
Search instead for 
Did you mean: 

SQL script that returns data when used in a procedure doesnt show any data when used in calculation view

former_member212706
Participant
0 Kudos

Dear experts,

I had written a SQL script in a procedure and called it. It gives me the expected results. when i copy the same code to a scripted calculation view and assifn the final result to var-out and preview the data. it returns zero rows.

What could be the reason behind this strange behaviour?

Thanks,

Rajesh.

Accepted Solutions (0)

Answers (3)

Answers (3)

rindia
Active Contributor
0 Kudos

Hi Rajesh,

Unless you give some details of your problem, it will be difficult to all in helping you.

At-least could you give the in and out parameters of the procedure and their data type, if you could get the chance.

Regards

Raj

former_member212706
Participant
0 Kudos

HI Raj,

The procedure that i had created doesnt have any input or output parameters. The Caculation view as you might know will always have an output parameter var_out(table type parameter) and there are  no other input parameters in it.

Thanks,

Rajesh.

justin_molenaur2
Contributor
0 Kudos

This is very confusing - your original post was

"when i copy the same code to a scripted calculation view and assifn the final result to var-out and preview the data. it returns zero rows."

Now you say

"The procedure that i had created doesnt have any input or output parameters."

What exactly were you assigning to var_out since the procedure is not going to return any results? I'm with Raj on this one - your issue or scenario is not laid out clearly enough for us to assist.

Regards,

Justin

former_member212706
Participant
0 Kudos

When i try to call the procedure i get the following error

 

SAP DBTech JDBC: [1281]: wrong number or types of parameters in call: VAR_OUT is not bound:

i havent used any input parameters in the calculation view.

Thanks,

Rajesh.

Former Member
0 Kudos

Hi Rajesh,

Give a try like this.

call "_SYS_BIC"."packagename/yourcalculationviewname/proc"(?);

or

call "_SYS_BIC"."packagename/yourcalculationviewname/proc"(null);

you need to pass the output parameter value as: ? or null.

Thanks

Basha.


former_member212706
Participant
0 Kudos

Thank you. The call was successful. But the result still has zero rows with the procedure call too. How can i check the run time code?

Former Member
0 Kudos

Thanks Basha, i got same issue and your advise helped me.

mert_karakilic
Participant
0 Kudos

Thanks man! not sure why null or ? helped but solved the issue. here is this in the guides? Bizarre

Former Member
0 Kudos

Hi Rajesh,

If you get a chance, Please attach the screenshot .

Thanks

Basha

former_member212706
Participant
0 Kudos

Sorry .I am not sure if i could share the details. But i am very sure that the code in the procedure and the calculation view are exactly the same.

Thanks,

Rajesh.

former_member182114
Active Contributor
0 Kudos

Hi Rajesh,

Happens same thing if you call the calculation view?

Give a try:

call "_SYS_BIC"."packagename/yourcalculationviewname/proc"(?);

Regards, Fernando Da Rós

----

Complementing:

Also compare the runtime code of your procedure which you can found inside catalog -> procedures on schema _SYS_BIC. Remind that your Calculation will have a procedure ended with /proc

Regards, Fernando Da Rós

Message was edited by: Fernando Ros