‎2006 Jun 16 2:21 PM
Hi guys,
I'm looking for a way to read data from a non-SAP database into SAP, if possible using some ABAP-coding. The external database probably does not reside on the same machine as the SAP-Applicsation server. Is this possible?
Thanks and regards
Jan
‎2006 Jun 16 2:23 PM
‎2006 Jun 16 2:28 PM
Hi,
sounds good, but how do i connect to the external db-server? I know that there is transaction DBCO, but it is not possible to specify an IP for the server?
Thanks and regards
Jan
‎2006 Jun 16 2:34 PM
I think the connection information field has the technical info related to the database:
<b>Database-specific information for a database
connection
This field contains the technical information that is analyzed in native
SQL in the CONNECT statement in order to open the database connection.
The exact information required depends on the database.
Oracle:
TNS name of the database to which you want to connect. </b>
Regards,
Ravi
‎2006 Jun 19 8:04 AM
Hi,
thanks for Your answers so far, but can anyone confirm how to set up the connection to a remote database (remote meaning, the database sits on different server than the application server)?
If this is done by transaction DBCO, how do I fill misterious field which "contains the technical information that is analyzed in native SQL in the CONNECT statement in order to open the database connection"?
Thanks and regards
Jan
‎2006 Jun 16 2:27 PM
you can use native sql commands like
DATA: exc_ref TYPE REF TO cx_sy_native_sql_error,
error_text TYPE string.
TRY.
EXEC SQL.
INSERT INTO scarr
(MANDT, CARRID, CARRNAME, CURRCODE, URL)
VALUES ('000', 'FF', 'Funny Flyers', 'EUR',
'http://www.ff.com');
INSERT INTO scarr
(MANDT, CARRID, CARRNAME, CURRCODE, URL)
VALUES ('000', 'EF', 'Easy Flyers', 'EUR',
'http://www.ef.com');
ENDEXEC.
CATCH cx_sy_native_sql_error INTO exc_ref.
error_text = exc_ref->get_text( ).
MESSAGE error_text TYPE 'I'.
ENDTRY.
But you cannot use these statements which doesn't support native sql commands.
Regards,
ravi
‎2006 Jun 16 2:33 PM
I think you can talk to your Basis team to set up the connection.
Or use :
EXEC SQL.
-> Connect :v_base.
ENDEXEC.
Or use the SELECT .. FROM table_name@server_name
Please do reward if it helps you.
Regards,Felipe Cunha [FpdC]