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: 

Runtime error using range table in select query

Former Member
0 Kudos
112

I have to select tcodes from table tstc, based on the entries in ust12,

the entries in ust12-von and ust12-bis, these contains wild charcters also, and i have to selct all the tcodes from von to bis.

so ia m preparing a range table for the entries in ust12, and querying table tstc, then i am getting a runtime error with following description.

'If the problem occurred because an excessively large table was used

in an IN itab construct, you can use FOR ALL ENTRIES instead.'

but how can i use FOR ALL ENTRIES here, because if von = A* and bis = AB*,then i ahve to read all the entries from AAAA till ABZZ (may be something like this),

is there any way to write this query, with out runtime error.

there are total 15000 entries in ust12, i am preparing range table for 3000 entries each and querying tstc.

Thanks in advance

Best Regards

Amarender Reddy B

3 REPLIES 3

Former Member
0 Kudos
75

hi,

in the range table use CP for option field (Contains Pattern) and in the select stmt use LIKE.

Rgds.,

subash

0 Kudos
75

Hello Subash,

i was using the same way,

but anyways, can you explain little more how your solution solves the problem, if possible

Former Member
0 Kudos
75

Hi,

first write a select on ust12 based on ust12-von and ust12-bis.

eg: select von bis from ust12 into table gt_ust12

where von LIKE 'A%'

and bis LIKE 'AB%'.

now write another select for tstc for all entries in gt_ust12...

Hope it helps

Regards,

Pavan