‎2006 Sep 15 6:41 AM
How do we transfer data from an SAP Ztable to an SQL server? I have got the ip address, user id and passowrd of the SQL server. How do I go about thus?
‎2006 Sep 15 6:45 AM
Hi
One way is to write a program, which extracts the data
from ZTABLE, download to application server and trasnfer
the same to other server using FM's: FTP_CONNECT, FTP_COMMAND, FTP_CLOSE.
Doing this way, you can use the same object whenever
itz necessary or schedule it as per the requirement.
Kind Regards
Eswar
‎2006 Sep 15 6:48 AM
‎2006 Sep 15 6:50 AM
You can give this data in the transaction DBCON and open a connection using the native SQL statements and then in the command. In this we can use the database specific insert commands.
EXEC.
ENDEXEC.
‎2006 Sep 15 6:51 AM
‎2006 Sep 15 6:55 AM
Create an entry for the External database in DBCON table using Trxn: DBCA.
Step 1: Create an entry for the External database in DBCON table using Trxn: DBCA.
Table: DBCON (Description of Database Connections)
Field Name Description Value (For: E.g.:)
CON_NAME Logical name RAJ
DBMS Database system MSS
USER_NAME Database user <username>
PASSWORD Password <pwd>/<pwd>
CON_ENV Database-specific information
connection
MSSQL_SERVER=depotserver MSSQL_DBNAME=HOF_INDORE
DB_RECO Availability type for an open database connect
Step 2: Now you can write code to connect to the external database
Your Sample code can be something like this
EXEC SQL.
CONNECT TO 'RAJ' AS 'V'
ENDEXEC.
EXEC SQL.
SET CONNECTION 'V'
ENDEXEC.
*- Get the data from MS-SQL Server
EXEC SQL.
open C1 for
select
loc_id,
loc_name,
loc_state
from ho_loc_mast
ENDEXEC.
‎2006 Sep 15 7:03 AM
Hi sushma,
hru?
chk this link,hope it helps u.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncomsrv/html/integratingcs.asp
regards,
keerthi.