2012 Aug 05 11:25 AM
Dear All
We have SQL Server in the Quality Server. We have two databases in it.
1. SAP R3 database is AEQ.
2. HR Database is HRMS
I need to access a table inside HRMS database from SAP R3 database AEQ. (Both the database are in same server where SAP is installed)
I have set the following Configuration in order to Connect to External Datbase (SQL Server database)from SAP.
However
It gives error on third EXEC SQL
saying
You tried work with name of the table or view that does not exist in the databse.
However, my table name is correct. i am able to view it in the database.
Kindly help me where I am missing.
Regards,
Venkat
1. DBCO.
I set DATABASE Connection : <TDATA>
DBMS : MSS
Username and Password: <uid./<pwd>
Connection informaltion : MSSQL_SERVER=<IP Address> SQL_DBNAME=<dbname>
2. I have written a connection ABAP program and tested. It displays an error message as follows
TRY .
EXEC SQL .
CONNECT TO 'TDATA'
ENDEXEC.
EXEC SQL.
SET CONNECTION 'TDATA'
ENDEXEC.
EXEC SQL.
SELECT COUNT(*) into :l_counter from <tablename>
ENDEXEC.
write : l_counter .
CATCH cx_sy_native_sql_error INTO exc_ref.
error_text = exc_ref->get_text( ).
MESSAGE error_text TYPE 'I' RAISING sql_error.
ENDTRY.
2012 Aug 05 8:51 PM
Hi Venkateswaran,
if I understand you correctly the connection works (no error after CONNECT TO...), but the table is not found.
One guess: which user did you enter in DBCO? I recall (but from some tests in relation to SAP HANA, not with MSS) that - at least per default - the ABAP system connects to the schema equal to the user.
Best regards
Thorsten
2012 Aug 07 10:54 AM
Dear Thorsten,
Thankyou for the reply,
The CONNECT itself gives sy-subrc = 4. That means the connection is failed. I an worried, where i am missing.
Is there any Notes, or other configurations to be done?
If anyone help, will be greatful.
Regards,
Venkat
2012 Aug 08 8:04 PM