Application Development 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: 

getting dump SAPSQL_STMNT_TOO_LARGE.

Former Member
0 Kudos

Hello all,

In my report i am calling one FM. in that i nee to pass tcode, date, bname(these all three are range tables). all these 3 range tables formate has, like

sigh = 'I',

option = EQ,

low = value (respective values tcode, date, bname) ,

high = space

Any 2 of these 3 tables contains large no.of records. if i pass like this i am gettin the dump SAPSQL_STMNT_TOO_LARGE.

If i call the same FM from se37 by passing same data, for this i am getting output, but data format like I, BT, Low value & High value.

Plz help on this...

Regards.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I think data in your select options are filled only in LOW ..

U cannot have more than 1500 entries in low .. U can give any range but not only in low ..

Try to change the select option and fill both LOW and HIGH else restrict your LOW values ...

5 REPLIES 5

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Create 3 structures and then use the structure for passing to Fm.

ZZZ_SELECTOPTION Struture:

SIGN CHAR1 CHAR 1

OPTION OPTION CHAR 2

LOW sy-datum

HIGH sy-datum

Former Member
0 Kudos

I think data in your select options are filled only in LOW ..

U cannot have more than 1500 entries in low .. U can give any range but not only in low ..

Try to change the select option and fill both LOW and HIGH else restrict your LOW values ...

0 Kudos

Hi Srini Vas,

Exactly u got my problem

SELECT BNAME INTO TABLE itab1 FROM usr02 WHERE bname IN pbname AND class IN pclass.

REFRESH pbname[].

LOOP AT itab11.

pbname-sign = 'I'.

pbname-option = 'EQ'.

pbname-low = itab1-bname.

pbname-high = ' '.

APPEND pbname.

CLEAR pbname.

ENDLOOP.

same like i am appending tcode also.... Can you plz help with block code instead of looping & appending.

-Regards.

0 Kudos

Hi Prabhakar,

Error is because of large number of entries only. But i think it is 1999 and not 1500.

Since the values for which you need to get data would be disjoint, you could try to fill the range in a way to have max 1999 entries an loop on the FM. Sample code could be like this.

DESCRIBE TABLE bname lines.

DO ((lines DIV 1999) + 1) TIMES.

fill range by looping on bname. 1999 entries each time.

CALL FM. Result in result_tab.

Append result_tab to output_tab.

ENDDO.

0 Kudos

Thnx for all problem solved...