on 01-23-2007 11:39 AM
Hi!
When I try to run this program, the session terminates, the work process restarts:
DATA:
string1 TYPE STRING,
string2 TYPE STRING,
string3 TYPE STRING,
lt_trkorr TYPE TABLE OF E070-TRKORR.
string1 = 'TRKORR'.
string2 = 'E070'.
string3 = 'TRKORR IN ( SELECT TRKORR FROM e071 )'.
SELECT (string1)
INTO TABLE lt_trkorr
FROM (string2)
WHERE (string3).
However, if I use the static command, it runs fine:
select trkorr
from e070
into table lt_trkorr
where TRKORR IN ( SELECT TRKORR FROM e071 ).
I'm using WAS 6.10.
Thanks and Best Regards,
Tamas
Can we use something like 'vbeln in r_vbeln' where r_vbeln is declared ranges.
I'm trying the below code:
data: lv_where type string.
I'm trying to use select *from table into itab where (lv_where).
I get this exception 'CX_SY_DYNAMIC_OSQL_SEMANTICS'. Can someone please guide me a solution for this..
Thank you
Sreesanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tamas,
the problem is, that a subselect is not supported in the WHERE - (cond_syntax) expression. If you read the online documentation carefully, you may be come the same conclusion, that you can only use simple logical conditions in this syntax path. The WHERE - subquery is an independent path in the documentation.
Also the error analysis gives you the same information:
<i>The part of the WHERE, ON, or HAVING condition specified at
runtime in the internal table itab contains an invalid
value "SELECT".</i>
Best regards
Ralph Ganszky
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you debuged the program?
Check the values of the variables before the dynamic SELECT command.
If all the variables does have the required values in them then, try to use one variable at a time, just to check which variable is actually causing the problem.
Narrow in, into the problem.
Do let me know the results of your check.
Regards,
Ammey Kesarkar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, I'm having the same problem with a dynamic subquery. My query is this:
select PEBELN PEBELP into table i_resultado
from EKPO as P
where (v_wher).
v_wher has the value: EXISTS ( SELECT * FROM EKPO AS P2 WHERE PEBELN = P2EBELN AND P2~EBELP = 30 )
The same query works fine if it is static.
The dump I receive says the following:
"An exception occurred. This exception will be dealt with in more detail
below. The exception, assigned to the class 'CX_SY_DYNAMIC_OSQL_SEMANTICS', was
not caught, which
led to a runtime error. The reason for this exception is:
<b>The SELECT clause was specified in an internal table at runtime.
It contains the field name "EXISTS", but this does not occur in any of
the database tables listed in the FROM clause</b>."
It seems not to recognize the subquery.
Any idea?
Leandro, check the following link:
http://www.s001.org/ABAP-Hlp/abapdynamic_logical_condition.htm
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.