‎2009 Nov 30 12:18 PM
In my function I am using the following code:
DATA: lv_message TYPE string.
DATA: sql_error TYPE REF TO cx_sy_native_sql_error.
DATA: dbcursor TYPE c.
TRY.
EXEC SQL.
open :dbcursor for
SELECT partner
FROM but000
WHERE UPPER(name_first) LIKE :name_first
ENDEXEC.
CATCH cx_sy_native_sql_error INTO sql_error.
lv_message = sql_error->get_text( ).
MESSAGE lv_message TYPE 'E'.
ENDTRY.
This is giving the error message: "You tried to work with the name of a table or view that does not exist in the database".
Same error message occurs when I add the declaration: TABLES but000.
How can this be solved?
Kind regards,
Lieselot
‎2009 Nov 30 12:54 PM
Hi,
this is what the documentation says:
Open the database cursor C1 in the database table SFLIGHT for a SELECT statement
DATA: C1 TYPE CURSOR.
OPEN CURSOR C1 FOR
SELECT * FROM SFLIGHT WHERE CARRID = 'LH '.
So, you have an error when opening the database cursor, in the way how you declared the instruction.
‎2009 Nov 30 2:17 PM
‎2009 Nov 30 2:30 PM
hi,
just check from SE11 if the table but000 exists....
also just check if you have declared the variable
first_name in the data declaration...
Thanks,
Sid