2006 Jul 28 9:51 AM
Hi all,
I have a problem using CL_GUI_FRONTEND_SERVICES=>FILE_EXIST within a select loop. I want to loop through a databasetable with filenames and if the file exists, do some stuff with it. The method works good, but when the loop is executed and the next SELECT is executed I get a short dump:
DBIF_RSQL_INVALID_CURSOR
CX_SY_OPEN_SQL_DB
Invalid interruption of a database selection.
This is my code:
SELECT file FROM files INTO l_file.
WHERE EXTID = p_extid AND UNAME = sy-uname.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_EXIST
EXPORTING
FILE = l_strfloc
RECEIVING
RESULT = l_result.
ENDSELECT.
2006 Jul 28 9:56 AM
Better select data into table.
then use
LOOP AT ITAB.
CALL GUI_FRONT END SERVICES.
ENDLOOP.
OTHER WISE......you cannot interfere the Prsentation (Desktop) Servier Logic with the DATA BASE LOGIC ....SELECT ENDSELECT.
Vijay
Hi all,
I have a problem using CL_GUI_FRONTEND_SERVICES=>FILE_EXIST within a select loop. I want to loop through a databasetable with filenames and if the file exists, do some stuff with it. The method works good, but when the loop is executed and the next SELECT is executed I get a short dump:
DBIF_RSQL_INVALID_CURSOR
CX_SY_OPEN_SQL_DB
Invalid interruption of a database selection.
This is my code:
SELECT file FROM files INTO l_file.
WHERE EXTID = p_extid AND UNAME = sy-uname.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_EXIST
EXPORTING
FILE = l_strfloc
RECEIVING
RESULT = l_result.
ENDSELECT.
2006 Jul 28 9:56 AM
Better select data into table.
then use
LOOP AT ITAB.
CALL GUI_FRONT END SERVICES.
ENDLOOP.
OTHER WISE......you cannot interfere the Prsentation (Desktop) Servier Logic with the DATA BASE LOGIC ....SELECT ENDSELECT.
Vijay
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |