2013 Aug 26 6:29 PM
Hi Abapers,
We are tryng to make some updates to external oracle databases. We are in a new project and we are new in theses issues so we are asking for your help.
We have the following source code
....
CONCATENATE 'insert into' c_tabname INTO teste1 SEPARATED BY space.
MOVE: 'VALUES' to teste2,
'(6, 4, 5, 99, TO_DATE(20020102,YYYY.MM.DD), 3, 5)' to teste3.
CONCATENATE teste1 teste2 teste3 INTO l_stmt SEPARATED BY space.
l_prepstmt_ref = p_con_ref->prepare_statement( l_stmt ).
....
We get teh following error
con=2(10.0.99.136:1521/SFA): ORA-01036: illegal variable name/number
the table has, in the external database the following structure
"ACA_CODEMP" "NUMBER(5,0)”
"ACA_CODDEL" "NUMBER(5,0)”
"ACA_CODART" "VARCHAR2(15 BYTE)"
"ACA_CODSEG" "VARCHAR2(2 BYTE)”
"ACA_FECHAINI" "DATE”
"ACA_PRECIO" "NUMBER(8,4)”
"ACA_FECHFIN" "DATE”
Can you give some information about what we are doing wrong?
Thank you and best regards
João Fernandes
2013 Aug 26 10:53 PM
Hi,
First check the DB connection if that is defined in ST04. Check the demo program DEMO_ADBC_QUERY should give you a good idea on whats missing in the statement. The idea is the Query should be exactly same as per Oracle Syntax and supplied as string.
Cheers,
Arindam
2013 Aug 27 9:59 AM
Hi,
Thank you Arindam for your response.
The program you suggest me is very helpful but is useful if i am querying the SAP database.
The question i report is trying update the remote Oracle database.
I receive the error from that not from SAP database.
Thank you and best regards
João Fernandes
2013 Aug 27 12:09 PM
Hi,
In ST04 configure a connection to the external DB that you want to probe. Then use that connection to connect to the DB execute the SQL and get back the results.
Cheers,
Arindam
2013 Aug 27 3:29 PM
Hi Arindam,
Thank you for your answer. I can see now your point.
Can you give me some more information about st04 configuration?
I have the connection established successufully. Where can i test my SQL sentence?
Thank You and Best regards
João Fernandes
2013 Aug 27 5:33 PM
In ST04 configure a connection to the external DB that you want to probe.Afaik the external DB connection parameters are maintained in the transaction DBCON. ST04 gives you the SAP database statistics.
- Suhas
2013 Aug 28 3:49 AM
Hi Suhas,
The new ST04 gives a more integrated functions and leads to T-Code ORA_PERF that has the DB config option in it also.
Cheers,
Arindam
2013 Aug 28 3:08 PM
2013 Aug 29 1:40 AM
Welcome.. I think its available in the new releases.. the Old ST04 did not have it.
Cheers,
Arindam