‎2005 Oct 14 5:22 AM
Hi people,
in my program, I have some SQL Stmts that can not be executed because the table is missing in the system. I have got many stmts in my program. I would not like to check each stmt in my program.
If I would like to test the program, I get the message that the corresponding table is missing.
How can I skip this?
If I generate and run the program, how can I skip stmts that are not executable because of missing tables?
Is there any possibility?
‎2005 Oct 14 2:53 PM
Holger - I assume this is related to your earlier question. I think your only option is to create the program using the generate statement. But now, before generating an SQL statement for a table, you have to check its existence in table DD02L.
Rob
‎2005 Oct 14 5:40 AM
hi,
we can use CATCH ... Exceptions , but your case its not helpful, you can simply comment it and execute the report
cheers,
sasi
‎2005 Oct 14 6:58 AM
but I will have to comment all the stmts manually. If there are thousand of stmts, this will take a long time.
Or do you mean that there is any possiblity to comment if automatically?
If one of the stmts does can not be executed, I would like to continue with the next one.
The program should not stop if an invalid stmt is tried to be executed...
‎2005 Oct 14 7:06 AM
hi,
I thing there is no single statement used like if any error execute next one
using sy-subrc you can validate some statements, but that also we should do manually
comment is the only option
select bulk of lines then use Ctrl+< ( it will comment all the selected lines
cheers,
sasi
‎2005 Oct 14 7:07 AM
Hi Holger ,
I guess you are trying to execute a program which has syntax errors ( like database table does not exist ). This is not possible unless you fix the program and make in syntax error free.
Also there is no other way than manual to comment out the individual lines .
I am wondering where did you get such a program on your system which does not have the referenced tables in the database / data dictionary.
Cheers.
‎2005 Oct 14 10:32 AM
I would do some tests in a test system. I got the SQL stmts in a productive system. The test system does not have all data that exist in the productive system or rather the content of the tables may differ.
but a transport would solve the problem...
‎2005 Oct 14 6:10 AM
why would u need sql statements for tables that do not exist in the Database/DDIC.
The program will throw a syntax error saying that the corresponding table name speficied is not a table or a view....u must comment such statements and then proceed.
rgds,
PJ
‎2005 Oct 14 6:52 AM
Holger,
If you prefer, you can do this from the Editor. Go to Program -> Check -> Extended Program Check. In the next screen, Checks -> Standard Check.
Then from the follwing screen you can double click the 'Error Column' and change/comment out the code from there. The advantage of this is you can see all your syntax errors at one place. You also have the option to correct from the editor one-by-one by doing Syntax Check.
Cheers,
Syd.
‎2005 Oct 14 2:53 PM
Holger - I assume this is related to your earlier question. I think your only option is to create the program using the generate statement. But now, before generating an SQL statement for a table, you have to check its existence in table DD02L.
Rob