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

CL_GUI_FRONTEND_SERVICES in select loop

Former Member
0 Likes
412

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
375

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.

1 REPLY 1
Read only

Former Member
0 Likes
376

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