cancel
Showing results for 
Search instead for 
Did you mean: 

Using HANA View's Input Parameter in Stored Procedure

vkris215
Participant
0 Kudos
1,280

Hello All,

I have a requirement where I need to use the Input parameter of a Calculation View in Stored Procedure for fetching some values from a table(TVARVC) and populate those entries into another input parameter of the same Calculation View that is used above.

Example: I have a Calculation View for Sales order details where there are 2 input parameters for Company Code(of Direct parameter type) and Plant(based on stored procedure). However, I've made some entries in TVARVC table w.r.t Company Code and Plants as below where 1000 & 300 are company code and 1200, 1300, 3600 etc are plants.

Now based on users input for company code, I need to pick the relevant PLants from TVARVC table and populate it in Plant input parameter.

I have searched over SAP communities, but all i could see is using the hana view in procedure fr fetching data, but no the view's IP for processing the procedure logic.

Can someone suggest me how can I achieve this ?

Thanks.

View Entire Topic
former_member231709
Active Contributor
0 Kudos

If you mean ABAP Managed Database Procedures (AMDP) then you can call a calculation view like this: https://answers.sap.com/answers/12606669/view.html

Or you can use external view for CV https://blogs.sap.com/2014/01/08/consuming-hana-views-procedures-external-views-in-abap-740-syntax-p...