cancel
Showing results for 
Search instead for 
Did you mean: 

Question Regarding AND Token

BuckeyeScott
Explorer
0 Kudos

I have built a custom query which contains multiple filter prompts including a 'RFx Creation Begin Date' and a 'RFx Creation End Date'.

My query uses these two filters to evaluate the RFx creation date (FCI_RFX_DOC.CREATED_AT).

With the filter prompts defined as mandatory, my query executes successfully.

When I define the filter prompts as optional, I get a 'java.lang.NullPointerException' error during execution.

Is it possible to make these filter prompts optional by using the AND token in the WHERE clause? I looked at several standard SAP queries and anytime a date range is used, it's always defined as mandatory input.

My WHERE clause currently looks like this ...

WHERE

...

AND TO_DATE(TO_CHAR(T1.CREATED_AT,'MM/DD/YYYY'),'MM/DD/YYYY') >= ?

AND TO_DATE(TO_CHAR(T1.CREATED_AT,'MM/DD/YYYY'),'MM/DD/YYYY') <= ?

...

Thanks, Scott

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Scott,

According to the SAP training guide, you cannot set dates as optional.

Regards,

Immanuel

Former Member
0 Kudos

Thanks Immanuel.

I have received additional info from SAP that our current version (5.1) will only support optional filters for string fields. However, version 7.0 will support optional filters for all field types using the AND_OP token.

Best Regards, Scott