on 11-30-2010 7:54 PM
Hi guys.
I need to connect to an Oracle DB to get data from it.
I read a lot of forums, but I'm not able to create a DBCO connection and I'm stuck on it.
1) how do i create the connection to Oracle?
the data of the Oracle server is:
192.168.xxx.xxx (name SRVLIM**)
data base name on Oracle = SM92
user: li***
password = li**
2) once i have created the connection, what do i have to do in ABAP code to get the data??
Please some helps.
Regards
...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi guys.
I was able to create the connection from SAP to Oracle DB using DBCO. I tested it using the program (se38) ADBC_TEST_CONNECTION and it works well.
Now I'm coding a program to get data from that DB in Orackle. I was able to get all the data, but i need to get some especific data from a date > '01-09-2010'
The problem is that i'm getting a DUMP. I guess is because the where sentence is wrong.
What am I doing wrong?
Check my code:
DATA: BEGIN OF datos OCCURS 0,
id_numeric(10),
END OF datos.
DATA: c TYPE cursor.
EXEC SQL.
connect to 'LIM' as 'MYDB'
ENDEXEC.
* Open connection
EXEC SQL.
SET CONNECTION 'MYDB'
ENDEXEC.
EXEC SQL performing loop_output.
SELECT ID_NUMERIC into :datos from lims.SAMP_TEST_RESULT
where SAMPLED_DATE = '2010-09-01'
ENDEXEC.
EXEC SQL.
disconnect 'MYDB'
ENDEXEC.
FORM loop_output.
WRITE: / datos-ID_NUMERIC.
ENDFORM.
if i comment the where sentence, it works well, but i need to use it. What I am doing wrong??
Help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you check R3trans with the option to export data from specified database tables?
Create a control file:
export
client = <CLNT>
file = <path/exportfile>
select * from <TABLE>
Then execute R3trans with the given control file to export data from the DB:
R3trans -w <Log-File> <path/controlfile>
Hope this helps.
Kind regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What are you trying to achieve?Are you writing a piece of code where you want to connect to the DB using abap code ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.