cancel
Showing results for 
Search instead for 
Did you mean: 

DBIF_RSQL_INVALID_CURSOR

Former Member
0 Kudos

Hello Gurus,

Just by looking at the above error you people must have come to conclusion, that i am doing some wrong statement in a database loop select- end select.

But it is somthing which is unavoidable 4 me.

I am basiclly calling a function module in select - end select

So while running the code ( not in debug mode ) i am getting DBIF_RSQL_INVALID_CURSOR

The data fetched in my work area is so huge that i don't want to append it to internal table. So I am directly calling my FM withen select - endselect. And passing the wa to thet FM. and then refreshing the wa.

So please suggest me a wise solution to the problem.

Thnaks in advance!!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

First of all what i suggest to you is to avoid select - end select.Can you put your code here further information to look at it.

Former Member
0 Kudos

SELECT iwerk iloan ingrp submt tplnr

INTO CORRESPONDING FIELDS OF iflot

FROM iflot WHERE iwerk IN plant_range.

t_mat_eqfl-werks = iflot-iwerk.

t_mat_eqfl-eqfl_flg = 'F'.

t_mat_eqfl-equnr = space.

t_mat_eqfl-iloan = iflot-iloan.

t_mat_eqfl-ingrp = iflot-ingrp.

t_mat_eqfl-submt = iflot-submt.

REFRESH:

t_upper,

t_lower,

t_materials,

*start of change by chinmay

t_mat_eqfl.

*end of change by chinmay

IF iflot-submt = space.

t_upper-objty = 'T'.

t_upper-objnr = iflot-tplnr.

ELSE.

t_upper-objty = 'M'.

t_upper-objnr = iflot-submt.

ENDIF.

APPEND t_upper.

DO.

REFRESH t_lower.

PERFORM get_materials USING iflot-iwerk.

DESCRIBE TABLE t_lower LINES v_lines.

IF v_lines > 0.

t_upper[] = t_lower[].

ELSE.

EXIT.

ENDIF.

ENDDO.

*start of change by chinmay

CALL FUNCTION 'Z_OIO_GET_APL_CK'

EXPORTING

ONLINE = ONLINE

FILENAME = FILENAME

.

*end of change by chinmay

ENDSELECT. "from iflot

Answers (1)

Answers (1)

Former Member
0 Kudos

SELECT iwerk iloan ingrp submt tplnr

INTO CORRESPONDING FIELDS OF TABLE iflot

FOR ALL ENTRIES IN iflot

WHERE iwerk IN plant_range.

LOOP AT iflot. " try to use where condition at max

t_mat_eqfl-werks = iflot-iwerk.

t_mat_eqfl-eqfl_flg = 'F'.

t_mat_eqfl-equnr = space.

t_mat_eqfl-iloan = iflot-iloan.

t_mat_eqfl-ingrp = iflot-ingrp.

t_mat_eqfl-submt = iflot-submt.

REFRESH:

t_upper,

t_lower,

t_materials,

*start of change by chinmay

t_mat_eqfl.

*end of change by chinmay

IF iflot-submt = space.

t_upper-objty = 'T'.

t_upper-objnr = iflot-tplnr.

ELSE.

t_upper-objty = 'M'.

t_upper-objnr = iflot-submt.

ENDIF.

APPEND t_upper.

DO.

REFRESH t_lower.

PERFORM get_materials USING iflot-iwerk.

DESCRIBE TABLE t_lower LINES v_lines.

IF v_lines > 0.

t_upper] = t_lower[.

ELSE.

EXIT.

ENDIF.

ENDDO.

*start of change by chinmay

CALL FUNCTION 'Z_OIO_GET_APL_CK'

EXPORTING

ONLINE = ONLINE

FILENAME = FILENAME

.

*end of change by chinmay

ENDLOOP.