Truncate Command Not working
Folks, I have a SAP Table that I want to delete all the data from but still want to keep the table definition.. I dont want to fetch the records and then delete as this is a huge table so want to use a truncate command. The issue is that program has no syntax errors but it would not delete the data at all. Here is the code I have used and I am on a DB2 system, can someone help what I am doing wrong?
DATA: exc_ref TYPE REF TO cx_sy_native_sql_error,
error_text TYPE string.
TRUNCATE TABLE S194
CATCH cx_sy_native_sql_error INTO exc_ref.
error_text = exc_ref->get_text( ).
IF SY-SUBRC = 0.
write : / error_text .
Message was edited by: