When I call an oracle procedure with native sql, I write like this:
EXEC SQL.
call sp_myproc(:para1, :para2 );
ENDEXEC.
but It can't work, the program raise a error: Error 6550 occurred in the current database connection "COST".
What's the correct form please?
Then I use a triger to do the work:
TRY.
EXEC SQL.
BEGIN
insert into ZLOG(ID,TYPE,NAME,PARAM, USR)
VALUES( :G_DT, 'PROC' , :G_PROG , :G_PARAM , :G_USR );
COMMIT;
END;
ENDEXEC.
CATCH cx_sy_native_sql_error INTO exc_ref.
error_text = exc_ref->get_text( ).
MESSAGE error_text TYPE 'I'.
ENDTRY.
It's all right now, but I found another problem: When my procedure catched a exception and processed the exception correctly, ABAP still catch a excption and refused to continue. but I can run it at PL/SQL command window correctly.
Who can tell me how to let it work please?