‎2007 Nov 28 4:25 AM
Hi,
I am having a select-option <b>s_job</b> in my selection-screen.
In the program in select query i am writing condition in where as below:
<b>Select * INTO t_tbt
FROM tbtco
WHERE status EQ 'R' AND
jobname IN s_job.</b>
Now as per new requirement i can give <b>s_job</b> input as <b>Z122*</b>, so as per that i need to change select query.
how can i change query?
If i change where condition to <b>jobname LIKE 's_job%'</b> will that be fine.
Please clarify!
Thanks,
Deep.
‎2007 Nov 28 4:33 AM
data: lv_temp(50). " put one more than your job variable size
Loop at s_job.
concatenate s_job-low '%' into lv_temp
Select * appending table t_tbt
FROM tbtco
WHERE status EQ 'R' AND
jobname like lv_temp.
endloop.
‎2007 Nov 28 4:29 AM
no need to change the query if you are giving input Z122* in your select option s_job then your query will work fine.
Select * INTO t_tbt
FROM tbtco
WHERE status EQ 'R' AND
jobname IN s_job.
Only think you can not give range like z122* to z140* in your select option. Only single value is allowable for pattern.
regards
shiba dutta
‎2007 Nov 28 4:33 AM
data: lv_temp(50). " put one more than your job variable size
Loop at s_job.
concatenate s_job-low '%' into lv_temp
Select * appending table t_tbt
FROM tbtco
WHERE status EQ 'R' AND
jobname like lv_temp.
endloop.