2010 Feb 16 11:20 PM
Hello gurus!
I have a problem executing stored procedures from oracle. I'm executing a test procedure and doing the connection to the DB and everything seem to be ok, but it's not returning any result. Here is my code:
REPORT Z_WIACTIVOWF.
DATA: c TYPE cursor, p_entrada TYPE C, p_salida TYPE C.
EXEC SQL.
CONNECT TO 'CREA20'
ENDEXEC.
EXEC SQL.
OPEN c FOR
EXECUTE PROCEDURE stp_prueba_proc ( IN :p_entrada, OUT :p_salida )
ENDEXEC.
EXEC SQL.
CLOSE c
ENDEXEC.
EXEC SQL.
DISCONNECT :'CREA20'
ENDEXEC.
WRITE: / p_salida.I am new in this ABAP stuff, so any help would be appreciated.
Regards IA
Hello gurus!
I have a problem executing stored procedures from oracle. I'm executing a test procedure and doing the connection to the DB and everything seem to be ok, but it's not returning any result. Here is my code:
REPORT Z_WIACTIVOWF.
DATA: c TYPE cursor, p_entrada TYPE C, p_salida TYPE C.
EXEC SQL.
CONNECT TO 'CREA20'
ENDEXEC.
EXEC SQL.
OPEN c FOR
EXECUTE PROCEDURE stp_prueba_proc ( IN :p_entrada, OUT :p_salida )
ENDEXEC.
EXEC SQL.
CLOSE c
ENDEXEC.
EXEC SQL.
DISCONNECT :'CREA20'
ENDEXEC.
WRITE: / p_salida.I am new in this ABAP stuff, so any help would be appreciated.
Regards IA
2010 Feb 17 4:35 AM
2010 Feb 17 5:43 PM
Hello
I tried with the help you kindly provided me, and now appears this error: "The error 900 occurred in the current databse connection "X"", and the system says the error is triggered in the line: "FETCH NEXT c INTO :p_salida". Here is the code:
REPORT Z_WIACTIVOWF.
DATA: c TYPE CURSOR, p_entrada TYPE C, p_salida TYPE C.
p_entrada = ' 4 '.
EXEC SQL.
CONNECT TO 'CREA20'
ENDEXEC.
EXEC SQL.
OPEN c FOR
EXECUTE PROCEDURE stp_prueba_proc ( IN :p_entrada, OUT :p_salida )
ENDEXEC.
DO.
EXEC SQL.
FETCH NEXT c INTO :p_salida
ENDEXEC.
IF SY-SUBRC = 0.
EXIT.
ENDIF.
WRITE: / p_salida.
ENDDO.
EXEC SQL.
CLOSE c
ENDEXEC.
EXEC SQL.
DISCONNECT :'CREA20'
ENDEXEC.Regards
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |