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

Range table gives dump during select alternatives

Former Member
0 Likes
1,417

Hi Guys,

We have a report program where we build ranges for kunnr internally in the program and use it in the select statement as shown:

R_PAYER is a range table

Select fields from KNB1 into table ITAB where kunnr in r_payer.

When R_PAYER is fairly large the program dumps so i was thinking if i can change my select to something like this:

select KUNNR from KNB1 for all entries in r_payer

where kunnr EQ r_payer-low.

Can someone suggest better alternatives.

Thanks

Moderator Message: Duplicate

Message was edited by: Kesavadas Thekkillath

Hi Guys,

We have a report program where we build ranges for kunnr internally in the program and use it in the select statement as shown:

R_PAYER is a range table

Select fields from KNB1 into table ITAB where kunnr in r_payer.

When R_PAYER is fairly large the program dumps so i was thinking if i can change my select to something like this:

select KUNNR from KNB1 for all entries in r_payer

where kunnr EQ r_payer-low.

Can someone suggest better alternatives.

Thanks

Moderator Message: Duplicate

Message was edited by: Kesavadas Thekkillath

3 REPLIES 3
Read only

paul_bakker2
Active Contributor
0 Likes
995

Hi,

Obviously that will only work if all your entries in the range table are of type 'I EQ'.

If they are, then you are better off using 'for all entries', as the range table adds no value.

But there might still be a problem if the internal table is huge. How big does it get?

cheers

Paul

Read only

Former Member
0 Likes
995

Hi,

instead of ranges use internal table and in select use FOR ALL ENTRIS..it will work

Thanks

Read only

Former Member
0 Likes
995

Hi BM,

In your query - Select fields from KNB1 into table ITAB where kunnr in r_payer. where R_PAYER is a range of KUNNR,

Do you want to select all the fields? Is it possible that you select only the fields you need?

Also along with KUNNR, is it possible to give BUKRS also in the Where condition as BUKRS is also a key field in the table KNB1.

Ideally ranges do not lead to dump, its because you are not giving any other selection criteria and are select all 76 fields!!! Also hope you have put a condition about this select - 'IF R_PAYER is NOT INITIAL' and only then done this Select!

Hope this helps!