2006 Sep 20 2:44 PM
Hi,
I need to transfer data from SAP tables to a SQL table. Please suggest the best way as well as the steps please.
Regards,
Kamlesh
Hi,
I need to transfer data from SAP tables to a SQL table. Please suggest the best way as well as the steps please.
Regards,
Kamlesh
2006 Sep 20 2:55 PM
Hi
Step 1: Create an entry for the External database in DBCON table using Trxn: DBCA.
Field Name Description Value (For: E.g.:)
CON_NAME Logical name
for database con RAJ
DBMS Database system MSS
USER_NAME Database user <username>
PASSWORD Password for setting up
the connection
to the database <pwd>/<pwd>
CON_ENV Database-specific MSSQL_SERVER=depotserver MSSQL_DBNAME=HOF_INDORE
DB_RECO Availability type for an open database connect
Then, you can define internal table and code the following way:
DATA: BEGIN OF wa,
c_locid(3),
c_locname(50),
c_locstate(5),
END OF wa.
EXEC SQL.
CONNECT TO 'RAJ' AS 'V'
ENDEXEC.
EXEC SQL.
SET CONNECTION 'V'
ENDEXEC.
< Populate SAP data into an internal table >
Loop on itab.
EXEC SQL.
< code here for populating data into MS-SQL Server table>
ENDEXEC.
Endloop.
Regards,
Raj
2006 Sep 20 3:14 PM
2006 Sep 20 5:32 PM
Hi Raj,
I am getting a runtime error
ABAP runtime Errors DBIF_DSQL2_CONNECTSTR_ERROR.
I suppose i am not getting connected. please help me out
2006 Sep 20 5:37 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |