03-05-2007 10:45 AM
Hi guys,
sorry if you see the same post in another thread.
I got an BSP error like this
SAP Note
The following error text was processed in the system:
An exception with the type CX_SY_OPEN_SQL_DB occurred, but was neither handled locally, nor declared in a RAISING clause
Exception Class CX_SY_OPEN_SQL_DB
Error Name DBIF_RSQL_INVALID_CURSOR
Program /CAG/SAPLCSV_EXPORT
Include /CAG/LCSV_EXPORTU01
Line 362
Long text: A database COMMIT occurred during an Open SQL database selection. This selection was to have then continued. However, all database selections must be completed before a database COMMIT.
The most strange is that the same thing I did in Developement System works well, but in Test System I got this error message. Actually I don't have any commit in SQL selections like th message says.
What's wrong with it?
Thanks for ur suggestion
Regards,
Liying
03-05-2007 10:48 AM
03-05-2007 10:53 AM
the line 362 is "IF sy-subrc <> 0." of the following code.
In debug mode, I saw that it works once, but the second one (in loop) it shrows this error .
...
OPEN CURSOR WITH HOLD dbcur2 FOR
SELECT ainconuserid ainconfirstname ainconlastname ainconbu aconfirstname aconlastname aconemail aexconpower aexcon~influence
FROM zbrap_apro AS apro INNER JOIN zbrap_aincon AS aincon ON aproproject_id = ainconproject_id
INNER JOIN zbrap_aexcon AS aexcon ON aproproject_id = aexconproject_id
INNER JOIN zbrvp_acon AS acon ON aexconcprnr = aconcprnr
WHERE apro~project_id = project_no.
DO.
FETCH NEXT CURSOR dbcur2 INTO (userid, int_fname, int_lname, bu, ext_fname, ext_lname, email, power, influence).
IF sy-subrc <> 0.
EXIT.
endif.
.....
enddo.
03-05-2007 11:00 AM
How many rows does this SQL returns:
SELECT ainconuserid ainconfirstname ainconlastname ainconbu aconfirstname aconlastname aconemail aexconpower aexcon~influence
FROM zbrap_apro AS apro INNER JOIN zbrap_aincon AS aincon ON aproproject_id = ainconproject_id
INNER JOIN zbrap_aexcon AS aexcon ON aproproject_id = aexconproject_id
INNER JOIN zbrvp_acon AS acon ON aexconcprnr = aconcprnr
WHERE apro~project_id = project_no.
03-05-2007 11:03 AM
hi,
more than one row. But I don't know exactly...
I think it is the problem in codes between "where" and "endselect".