cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic parameters on a view

Former Member
0 Kudos

Dear all,

I have created a view in sql server comprising of sap tables. Later i used the same view to write a query in sap business one. Please advice if dynamic parameters will work on this query. We are using sap b1 2005A pl50

Kind Regards,

Monil

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Dear Monil,

The answer is: It depends. You may post your query here for others to check.

Thanks,

Gordon

Former Member
0 Kudos

Hi Gordon,

The query is as follows:

SELECT T0.[U_Categ],T1.[U_GLAc] FROM [dbo].[KOGLOAP] T0 , [dbo].[KGLO1AP] T1 WHERE T0.docentry = T1.docentry AND T0.U_Categ =[%1]

kogloap and kglo1ap are both actually views refering to sap udfs.

Kind Regards,

Monil

Former Member
0 Kudos

Have you tried by a static value?

Former Member
0 Kudos

Dear Gordon,

When i put a static value instead of %1 then the qwery executes properly but when i introduce the %1 it doesn't run in sap. Please advice if i need to include something else. Can dynamic parameters only work on sap tables and user defined tables only?

Kind Regards,

Monil

former_member1269712
Active Contributor
0 Kudos

Hi Monil,

You can add dynamic parameters on UDT also.

Try this..

SELECT T0.[U_Categ],T1.[U_GLAc] FROM KOGLOAP T0 
INNER JOIN KGLO1AP T1 ON T0.docentry = T1.docentry 
WHERE T0.[U_Categ] =[%0]

Thanks

Sachin

Former Member
0 Kudos

Hi Sachin,

The two tables are not UDTs. They are actually views created.

Kind Regards,

Monil.

former_member1269712
Active Contributor
0 Kudos

Hi Monil,

Basically you cannot pass dynamic parameters to views for this you can do one thing create one table in sql and insert all values in that table and then use it in query analyzer for passing Dynamic Parameters.

Thanks

Sachin

Answers (0)