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

Runtime error in background job

Former Member
0 Likes
1,955

Hi All,

I have scheduled a backgroundjob, but it was cancelled with an error DBIF_RSQL_INVALID_RSQL

the error analysis shows the reasons

Possible errors:

o The maximum size of an SQL statement has been exceeded.

o The statement contains too many input variables.

o The space needed for the input data exceeds the available memory.

o ...

i don't think the first two resons are suitable bcoz , my select statement has got two fields selecting from a single table and has got two ranges in the where clause.

can any one explain the meaning of the resons,

I would appreciate for your help

Regards,

sre.

Edited by: sre on Jan 13, 2009 10:17 AM

Edited by: Julius Bussche on Jan 14, 2009 2:47 PM

Removed greetings in the subject title

13 REPLIES 13
Read only

Former Member
0 Likes
1,508

Hi,

What are you doing after selecting data from the table?

Are you displaying the selected data from the spool.

Regards

Sandipan

Read only

0 Likes
1,508

Hi Sandipan,

Thanks for your reply,

after selctinf i am looping this internal table to cehck futher conditions on other tables tables. and then displaying the data. here is the code.

if lv_port > 0.

clear lv_port.

sort i_portiona.

select vkont gpart from fkkvkp

into table i_gpart

where vkont in r_vkont

and gpart in r_gpart.

if sy-subrc = 0.

loop at i_gpart.

clear: lv_port_in, lv_port_out, lv_multi.

read table i_portiona with key vkonto = i_gpart-vkont.

if sy-subrc = 0.

clear lv_port.

lv_str_portion = i_portiona-portion.

loop at i_portiona where vkonto = i_gpart-vkont.

if i_portiona-portion in s_port.

*-----flag to show that there is at least one portion that matches.................

can you please explain whetehr it is related to database problem or program problem

regards,

sre

Read only

Former Member
0 Likes
1,508

Hi ,

Can you tell where does the error occurs , in an select statement or some other statement.

Regards

Arun

Read only

0 Likes
1,508

Hi Arun,

Thanks for your reply,

the dump analysis shows that the error occurs on the select statement.

if lv_port > 0.

clear lv_port.

sort i_portiona.

select vkont gpart from fkkvkp into table i_gpart

where vkont in r_vkont

and gpart in r_gpart.

if sy-subrc = 0.

loop at i_gpart.

clear: lv_port_in, lv_port_out, lv_multi.

read table i_portiona with key vkonto = i_gpart-vkont.

if sy-subrc = 0.

clear lv_port.

lv_str_portion = i_portiona-portion.

loop at i_portiona where vkonto = i_gpart-vkont.

if i_portiona-portion in s_port.

*-----flag to show that there is at least one portion that matches the

*-----selection criteria

lv_port_in = 'X'.

can you please give some idea on this issue.

Regards,

Sre.

Edited by: sre on Jan 13, 2009 10:33 AM

Read only

0 Likes
1,508

Hi,

In the statement

select vkont gpart from fkkvkp into table i_gpart

where vkont in r_vkont

and gpart in r_gpart.

Please check if the requiremnt is to select all the data in case there is no value in the ranges r_vkont and r_gpart. This might be casuing the error as it will select all the records in the table if the two ranges are initial.

Regards

Arun

Read only

Pawan_Kesari
Active Contributor
0 Likes
1,508

How many records were there in ranges r_vkont and r_gpart. If records exceeds a certain limit the SQL statement will not be passed to Database server.

Check if number of records in r_vkont and r_gpart (taken together) doesn't exceed 500. You can try with more number of records if it works..

Read only

0 Likes
1,508

Anytime I see this in my system it's like Pawan Kesari suggests. Too many records in the ranges. I don't know what the exact limit is, but if there's more than about 1000 entries in the ranges that generally triggers the dump you're getting.

Read only

Sm1tje
Active Contributor
0 Likes
1,508

When using the INTO TABLE statement, make sure that the internal table i_gpart has exactly those fields you are selecting from database. Otherwise, use the INTO CORRESPONDING FIELDS addition.

Read only

Former Member
0 Likes
1,508

this type of error normally comes up if the number of records are more to be displayed at runtime.

I suggest that you to first ensure that the internal table which you are using is of the same structure if you are using only limited fields then please use SELECT INTO CORRESPONDING FIELDS.

after ensuring this please also check whether in the where clause you have the used Primary Key fields in the proper order as originaly defined in the database table. this is one of the most common reason that this kind of dump is generated.

if this is also proper then I suggest you use UPTO n RECORDS in the select query where n is the number limiting your records while selecitng it.

Please try it and let me know whether you were successful.

Read only

Former Member
0 Likes
1,508

Hi,

Check once to run in Back ground mode.

Regards

Md.MahaboobKhan

Read only

Former Member
0 Likes
1,508

HI,

I too faced this kind of problem, what we did was , we removed the ranges and then placed all the records in an internal table and then used FOR ALL ENTRIES, after that we did not received any DUMP in the back ground job.

Regards,

Venkatesh

Read only

former_member438956
Active Participant
0 Likes
1,508

Hi Sre,

The problem is with the SQL Statement. This problem may arise when u have given wrong indexes to fetch the data from server. Try to run the same query at server part and then check whether it gives the dump or not??

Regards,

Anil N.

Read only

Former Member
0 Likes
1,508

thanks