2013 Feb 28 5:14 PM
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
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
Message was edited by: Kesavadas Thekkillath
2013 Mar 01 1:49 AM
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
2013 Mar 01 2:41 AM
Hi,
instead of ranges use internal table and in select use FOR ALL ENTRIS..it will work
Thanks
2013 Mar 01 4:10 AM
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!
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |