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

SQL error "-2" occured when executing EXEC SQL

Former Member
0 Likes
905

Hi all,

An error occured when executing a shipment transaction.

There is a native SQL code written in a Z function module,where the dump occurs.

Runtime errors:DBIF_DSQL2_SQL_ERROR

Exception:CX_SY_NATIVE_SQL_ERROR.

The error points to a selection from a different database.

Kindly provide ur suggestion regarding this dump.

Regards,

Priya

5 REPLIES 5
Read only

Former Member
0 Likes
797

hi priya,

check out this link...

http://searchsap.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid21_gci1115445_tax299330,00.ht...

the note 594508 may be helpful..

reward points if it is helpful...

Read only

Former Member
0 Likes
797

Hi Priya,

there are mostly some clother information the in developer trace (transaction ST11)

- call the program and let it dump

- take a look in the short dump to get the number of the workprocess

- go to the ST11 and double click to the file dev_wxx, where xx is the number from step 2

- go to the end of the list

Good luck,

Stefan

Read only

0 Likes
797

Also.. post the native SQL code so we can help!

Read only

Former Member
0 Likes
797

hi,

This is because the maximum number of secondary database connections was exceeded.

Regards,

Sailaja.

Read only

Former Member
0 Likes
797

The native SQL code where it dumped was,

EXEC SQL.

SELECT SHIPMENT_STATUS INTO :SHIP_STATUS

FROM SHIPMENT_DN@PROD_ITP DN, SHIPMENT_ID@PROD_ITP ID

WHERE ID.SHIP_ID_TYPE = 5

AND ID.EXTERNAL_SHIP_ID = :ITSHIPID

AND ID.SHIPMENT_HANDLE = DN.SHIPMENT_HANDLE

ENDEXEC.

Regards,

Priya