04-30-2009 7:54 PM
Hi Gurus,
I am trying to access a third party database with Native sql. Basis has set-up a DBConnect with this database. When I tried to coonect to this databse, statement(CONNECT TO) showing sy-subrc = 4. My connection testing program is given here.
REPORT zbw_sd_test.
PARAMETERS: con TYPE dbcon-con_name.
EXEC SQL.
connect to :con
ENDEXEC.
WRITE: 'Sy-subrc = ' .
WRITE: sy-subrc.
When I chose another databse connection name, it is showing sy-subrc = 0.
Is that the problem with improper DBConnect?
How can I identify the reason for 'sy-subrc = 4' in CONNECT TO statement?
Pls guide me..
Thanks..
Saj
04-30-2009 8:00 PM
04-30-2009 8:00 PM
04-30-2009 8:03 PM
Hope this helps: [EXEC SQL|http://help.sap.com/abapdocu/en/ABAPEXEC_CONNECTION.htm]
05-01-2009 7:43 PM
05-02-2009 5:33 AM
Hi...
first write below mentioned code for connection.
EXEC SQL.
set connection 'CHANCRM'
ENDEXEC.
Salil..