Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Open SQL Error

Former Member
0 Likes
1,577

Hi,

Please help me out for the below issue.

Problem:

Cause: A database error occurred.

Runtime error: DBIF_RSQL_SQL_ERROR

Scenario:

Two servers NSA and NDA.

The same piece of code is executing fine in NSA but in NDA

it throws up the above problem

Investigation result:

No database table or field mismatch found.

No datatype mismatch found

So cause is so far unknown

Solution:

Not found, please help me out

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
1,122

Look at your Dumps (ST22) or Syslog (SM21), you should read an error like "SQL error -913 occurred when accessing table TSP02 ." which give the SQL error code (here 913 in the sample) and the database table/view impacted (here TSP02).

Which SQL error code (numeric 3) did you get?

Which table is accessed

Regards

7 REPLIES 7
Read only

RaymondGiuseppi
Active Contributor
1,123

Look at your Dumps (ST22) or Syslog (SM21), you should read an error like "SQL error -913 occurred when accessing table TSP02 ." which give the SQL error code (here 913 in the sample) and the database table/view impacted (here TSP02).

Which SQL error code (numeric 3) did you get?

Which table is accessed

Regards

Read only

0 Likes
1,122

Thanks for your prompt reply Raymond.

Yes, the system log displays the following error

"Database error 12899 at INS access to table ZBAICAL_ORD_HEAD"

and it point out the field also "PRINT_FLAG".

but the above field is 100% identical in both the servers.

I have thoroughly investigated this part.

Fieldname,Datatype and length matches perfectly.

But system log comments on the length as "(actual : 6 maximum : 3 )" which is not true in both the servers.

still lost in the problem:(

Read only

0 Likes
1,122

The ORA-12899 error occurs when the database field is shorter that the data used in the SQL statement. (look at [ Note 591600 - Error due to inappropriate column values|https://service.sap.com/sap/support/notes/591600])

When you say the field has the correct length, i suppose you refer to the length in the Abap Dictionnary ?

Maybe there is a gap between dictionnary and physical database. try to adjust the table via transaction [SE14|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=se14&adv=false&sortby=cm_rnd_rankvalue] or call transaction [DB02|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=db02&adv=false&sortby=cm_rnd_rankvalue] to check dictionnary vs database.

Regards

Read only

Former Member
0 Likes
1,122

Hello

Check table, address to which causes mistake.

Possible, in NSA it was modified and changes was not transported into NDA.

In any event this table must be absolutely alike for both servers.

Read only

0 Likes
1,122

Hi Dzed,

I have invertigated thoroughly all that, everything is fine but still getting the dump in NDA server.

Read only

0 Likes
1,122

Hello

There is else several thoughts on this cause:

1. table must be activated

2. all data elements (fields) must be similar also.

Read only

former_member282823
Active Participant
0 Likes
1,122

Hi,

This error we will get when there is no connection between the two servers. so check properly if the connections are working fine...

Regards,

Ramesh.