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

DBIF_RSQL_INVALID_CURSOR

Former Member
0 Likes
545

Hi Gurus,

I am getting this screen dump which I think is to do with the syntax in my non standard program. part of the dump is as follows:

1 &----


2 *& Include ZCRIP_F01

3 &----


4

5 &----


6 *& Form check_post

7 &----


8 * text

9 ----


10 * --> p1 text

11 * <-- p2 text

12 ----


13 FORM check_post.

>>>>> SELECT * FROM zmovetype WHERE type = zmovetype-type.

15 CASE zmovetype-id.

16 WHEN '1' OR '2' OR '3' OR '6' OR '7' OR '8'.

17

18 SELECT SINGLE * FROM vtbfhapo WHERE rfha = zpurch-dealid AND rfhazu = '3'.

19 IF sy-subrc = 0.

20 IF vtbfhapo-rantyp = '2' AND vtbfhapo-sbewebe = '2' AND vtbfhapo-ssprgrd = '0'.

21 PERFORM choose.

22 ELSE.

23 MESSAGE i009.

24 ENDIF.

25 ELSE.

26 MESSAGE i010.

27 ENDIF.

28 WHEN '4' OR '5'.

29 PERFORM choose.

30 WHEN OTHERS.

31 ENDCASE.

32 ENDSELECT.

33 ENDFORM. " check_post

Can you please identify where I'm going wrong.

Any assistance will be rewarded.

Hi Gurus,

I am getting this screen dump which I think is to do with the syntax in my non standard program. part of the dump is as follows:

1 &----


2 *& Include ZCRIP_F01

3 &----


4

5 &----


6 *& Form check_post

7 &----


8 * text

9 ----


10 * --> p1 text

11 * <-- p2 text

12 ----


13 FORM check_post.

>>>>> SELECT * FROM zmovetype WHERE type = zmovetype-type.

15 CASE zmovetype-id.

16 WHEN '1' OR '2' OR '3' OR '6' OR '7' OR '8'.

17

18 SELECT SINGLE * FROM vtbfhapo WHERE rfha = zpurch-dealid AND rfhazu = '3'.

19 IF sy-subrc = 0.

20 IF vtbfhapo-rantyp = '2' AND vtbfhapo-sbewebe = '2' AND vtbfhapo-ssprgrd = '0'.

21 PERFORM choose.

22 ELSE.

23 MESSAGE i009.

24 ENDIF.

25 ELSE.

26 MESSAGE i010.

27 ENDIF.

28 WHEN '4' OR '5'.

29 PERFORM choose.

30 WHEN OTHERS.

31 ENDCASE.

32 ENDSELECT.

33 ENDFORM. " check_post

Can you please identify where I'm going wrong.

Any assistance will be rewarded.

2 REPLIES 2
Read only

Sm1tje
Active Contributor
0 Likes
500

SELECT * FROM zmovetype WHERE type = zmovetype-type.

You are using the same table (field) in where clause as in select.

Normally you would take a variable or a selection screen parameter for field in where clause like this:

SELECT * FROM zmovetype WHERE type = p_mtype. "Selection screen parameter

But are you sure that dump occurs in this line?? Look at ST22

Edited by: Micky Oestreich on May 19, 2008 5:40 PM

Read only

Former Member
0 Likes
500

Thanks, Micky.

Yes, that's where the dump is occurring and I think you are right, but zmovetype-type is actually just a screen field from the previous screen, not an actual table field. Is there a way I can still use it without getting a dump?

Any new suggestions?

Regards