on 02-09-2009 1:44 PM
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!!
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.