Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8533

Re: Guidance required for SELECT query

$
0
0

If you want a start date and end date, it is a mistake to use a select option. It's a mistake often made by functional consultants as well. The reason it's a mistake is that the structure of a select option (an internal table with header line) is:

 

SIGN OPTION LOW HIGH

 

That means the user can enter all sorts of weird and wonderful combinations of selections, ranges and exclusions - and your code won't be able to handle it properly. What will you do if the user enters

I BT 01.01.2014 31.01.2014

I BT 01.01.2013 31.01.2013

 

Further, in your solution, you're saying that if the select option is empty, then you'll have some special logic. This is also a mistake. An empty select option in standard SAP throughout the SAP system means "select everything".

 

Far better (and what most SAP programs do, where they really just want a start and end date) is to use:

PARMETERS: start TYPE d, end TYPE d.


Viewing all articles
Browse latest Browse all 8533

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>