‎2008 Feb 22 1:15 PM
Hi
I have dynamic sql:
CONCATENATE 'datum <= ''' datumOP '''' INTO whereLine.
APPEND whereLine TO iwhereSQL.
select * from table WHERE (iwhereSQL)
but when I change it to:
datumRG is like parameter range
CONCATENATE 'datum IN ''' datumRG '''' INTO whereLine.
APPEND whereLine TO iwhereSQL.
then this don't work, it isn't correct.
How to define dynamic SQL with range field?
‎2008 Feb 22 1:20 PM
Hi Kosmo,
use following code.
select-options: datumRG for sy-datum.
CONCATENATE 'datum IN ' 'datumRG ' INTO whereLine separated by space.
Regards,
Yellappa.
Edited by: yellappa m on Feb 22, 2008 6:56 PM
‎2008 Feb 22 1:30 PM
It isn't too simple
Your code give effect "datum IN ' IEQ2008022200000000 '"
It's not work
‎2008 Feb 22 2:03 PM
Then you have to deal with every cases included within the select-option : EQ, but also BT, NE, GT, etc.
Loop at your select option and do some transalation with a Case/When.
N.H.