‎2009 Nov 20 7:43 AM
Hi,
I tried to read data using the following SQL Query,
fp_work = 'ABCD'.
EXEC SQL PERFORMING WRITE_TO_ITAB .
SELECT fp_code, bank_acc_code, bank_acc_num,
INTO :gs_cds_data-FP_CODE,
:gs_cds_data-BANK_ACC_CODE,
:gs_cds_data-BANK_ACC_NUM,
FROM BANK_TABLE
WHERE fp_code = :fp_wrk
ENDEXEC.
&----
*& Form WRITE_to_itab
&----
FORM write_to_itab.
To move the data into the Internal Table.
APPEND gs_cds_data TO gt_cds_data.
CLEAR gs_cds_data.
ENDFORM. "WRITE_to_itab
and im getting the run time error..
What happened?
The error occurred in the current database connection "SAPABC".
How to correct the error
Database error text........: "ORA-00936: missing expression"
Triggering SQL statement...: "FETCH NEXT "
Internal call code.........: "[DBDS/NEW DSQL]"
Please check the entries in the system log (Transaction SM21).
You may able to find an interim solution to the problem
in the SAP note system. If you have access to the note system yourself,
use the following search criteria:
-
"DBIF_DSQL2_SQL_ERROR" C
-
If you cannot solve the problem yourself, please send the
following documents to SAP:
Can anyone give me a solution to correct this error?
In addition, Can i omit the WHERE clause, as i need to get all the data in the oracle database?
‎2009 Nov 20 9:08 AM
The error is because the table you are selecting from ODS does not connected to SAP.
So ask ur DBA guy to connect the table to SAP.
‎2009 Nov 20 9:12 AM
BUT,
EXEC SQL.
connect to :LV_DB_NAME as :sy-uname
ENDEXEC.
EXEC SQL.
SET CONNECTION :sy-uname
ENDEXEC.
check sy-subrc..
connection is happening.. with sy-subrc value as ZERO
‎2009 Nov 20 9:17 AM
Connection will be happening but DBA should give the access rights like SELECT,INSERT,DELETE....
‎2009 Nov 20 9:32 AM
Could you please elaborate the above point.. so that I will get a better picture..
‎2009 Nov 20 9:40 AM
If u want to read the data from ODS table ur SAP server should have the access right to read the table.
This access right is given by DBA.For eg: If there is no such access right..anybody can create a ABAP program and
access all the database table rights? So all the tables will not be given to access by SAP server..so u need to request the
DBA for the access rights.
‎2009 Nov 20 9:48 AM
Is that something related to the customization in DBCO transaction.. where database connection name, database name, and user name are customized? or is there some other transaction code.. i would like to get a more detailed answer.. to understand.. what needs to be done.. n by whom? thanks for ur help..
‎2009 Nov 21 4:56 AM
First of all what u want to check with ur DBA guy whether there is all the access right to the table that ur accessing.If ur not maintaining any connection in DBCON table means it would be taking the standard connection.So you check with DBA fist....that is the first thing you want to do...