10-03-2008 3:19 AM
Hi All,
SELECT-OPTIONS : S_TCODE FOR TSTCT-TCODE.
START-OF-SELECTION.
SELECT * FROM TSTCT INTO TABLE IT_TSTCT
WHERE TCODE = S_TCODE.
...
The same code results in SYNTAX ERROR in 4.7c.
In ECC 6.0, no such error resulted, but SUBRC is 4.
Why is it like this in ECC 6.0?
Regards,
R.Nagarajan.
10-03-2008 3:24 AM
I think you should write the select this way:
SELECT * FROM TSTCT INTO TABLE IT_TSTCT
WHERE TCODE IN S_TCODE.
10-03-2008 3:47 AM
Hi Aparna Shekhar,
Yes. That is the correct way of using SELECT-OPTION.
But if you use '=' instead of 'IN', it should pop up ERROR.
I want to know why no error resulted while checking in ECC 6.0?
Regards,
R.Nagarajan.
10-03-2008 4:45 AM
Hi Nag,
When ever you are using select-options then you should use "IN" keyword in the select statement.
If you are using parameter then "=" .
Cheers!!
10-03-2008 5:17 AM
10-03-2008 5:35 AM
Nagarajan,
Really I can't think of any logical reason for such behaviour. This sounds more like a bug. Please let me know if you find some logical reason behind this.
Regards,
Gajendra
10-03-2008 5:43 AM
hi,
You are right in ECC 6 this will not give any error as long as you are referencing to the work area of the Select-option, but will start giving error as soon as you refer to the table using the [] command beside the select-option the it will give you a syntax error in ECC 6.0 also.
The reason might be the unicode enabling started in ECC 6.0
Hope That Helps
Anirban M.