cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Filter SAP HANA - For more than one field

Former Member
0 Kudos

Hi Guys,

    Is their any way we can apply filter for more than one field. Lets take below example  i want to apply filter both on PERNR & DOJ. I am able to apply filter on PERNR but when i try to create filter on more than one field (PERNR & DOJ ) it throws me some error.

Please let me know how we can achieve this.

OUT_EMP_SAL = SELECT A.PERNR, A.DOJ, A.FNAME, B.SALARY FROM "SAPH74".EMP_INFO A

INNER JOIN "SAPH74".EMP_SAL B

ON A.PERNR = B.PERNR;

OUT_EMP_SAP = APPLY_FILTER(:OUT_EMP_SAL, :IN_PERNR )

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hi Lakshmi,

I'm struggling with same problem what you had...

Did you solve your problem..? If then could you please let me know how you could revole it..?

BR,

Hyukjoo

former_member182302
Active Contributor
0 Kudos

Hi Lakshmi,

You may need to use the end while calling, i took the same example from the "Help" in hana.


CREATE PROCEDURE GET_PROCEDURE_NAME (IN filter NVARCHAR(100), OUT procedures outtype)

AS

BEGIN

    temp_procedures = SELECT SCHEMA_NAME, PROCEDURE_NAME FROM SYS.PROCEDURES;

    procedures = APPLY_FILTER(:temp_procedures,:filter);

END;


CALL GET_PROCEDURE_NAME(' SCHEMA_NAME = ''SYS'' AND PROCEDURE_NAME like ''TREX%''', ?);

Regards,

Krishna Tangudu

Former Member
0 Kudos

Hi Krishna

  Thanks for the answer. But i am looking for applying filter on more than two fields.

I want to apply filter on both IN_PERNR & IN_DOJ

former_member182302
Active Contributor
0 Kudos

Sorry i didn't get you.

I applied the filter on SCHEMA Name and Procedure Name ( 2 fields ) right?

Regards,

Krishna Tangudu