cancel
Showing results for 
Search instead for 
Did you mean: 

SAP HANA Stored Procedure issue.

owaisk
Participant
0 Kudos
434

Hello Community,

I have created a stored procedure, i want set the value for parameter Code to get last value from table + 1.

i am not getting how and where to use it, without setting value of parameter. stored procedure is running as user have to enter value manually in parameter.

Image attached, condition ishighlighted.

BR,

Accepted Solutions (1)

Accepted Solutions (1)

michael_eaton3
Active Contributor
0 Kudos

I would use MAX and do something like this...

owaisk
Participant

Hello michael.eaton3 , Thanks for the suggestion. I applied it for my stored procedure and it is working.

BR,

Answers (1)

Answers (1)

ghoshsayantan3
Explorer
0 Kudos

Firstly,you can create procedure’s as repository objects instead of catalog objects that gives more flexibility to change.(just a thought)

Also you can declare a variable in the procedure and use into key word to put it in the variable,then you can use the variable value +1 and return.