Hi
How to execute Stored Procedure with Date Paramters & a string Parameter in Sap b1 Hana
Thanks
Hi
How to execute Stored Procedure with Date Paramters & a string Parameter in Sap b1 Hana
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Muhammad Imran AnsariPosted Jan 28, 2025, 4:19 PM
Hi Ramco,
You can use the CALL statement in HANA SQL. Below is the syntax and an example to help you:
Syntex:
Example with Date and String Parameters:
Let’s assume your stored procedure looks like this:
Execution/Call:
Manikandan MurugesanPosted Jan 28, 2025, 5:00 AM
To execute a stored procedure in SAP B1 HANA with date and string parameters, you can use SQL commands through the SAP HANA database client (HANA Studio, HANA Cockpit, or SQL Console) or via SAP B1 SDK tools like the DI API or Service Layer.
Using SQL Console
Here’s the general syntax for executing a stored procedure with parameters:
Example Stored Procedure Execution:
Assume you have a stored procedure named
usp_GetOrderswith the following parameters:@StartDate(DATE)@EndDate(DATE)@CustomerCode(NVARCHAR or STRING)Here’s how you would call the stored procedure:
Key Notes:
"schema_name"with the actual schema where the stored procedure resides (default is usuallydbofor B1 systems).YYYY-MM-DD.').