2008 Mar 18 7:33 AM
Hi all my program is going to dump in quality as i am using MSEG table based on ebeln and ebelp.
please check the query below.
data: begin of imseg occurs 0,
mblnr like mseg-mblnr,
mjahr like mseg-mjahr,
menge like mseg-menge,
ERFMG LIKE MSEG-ERFMG,
erfme like mseg-erfme,
ebeln like mseg-ebeln,
ebelp like mseg-ebelp,
end of imseg.
if not ekpo[] is initial.
select mblnr
mjahr
menge
erfmg
erfme
ebeln
ebelp
from mseg into table imseg
for all entries in iekpo
where ebeln = iekpo-ebeln and
ebelp = iekpo-ebelp.
endif.
Hi all my program is going to dump in quality as i am using MSEG table based on ebeln and ebelp.
please check the query below.
data: begin of imseg occurs 0,
mblnr like mseg-mblnr,
mjahr like mseg-mjahr,
menge like mseg-menge,
ERFMG LIKE MSEG-ERFMG,
erfme like mseg-erfme,
ebeln like mseg-ebeln,
ebelp like mseg-ebelp,
end of imseg.
if not ekpo[] is initial.
select mblnr
mjahr
menge
erfmg
erfme
ebeln
ebelp
from mseg into table imseg
for all entries in iekpo
where ebeln = iekpo-ebeln and
ebelp = iekpo-ebelp.
endif.
2008 Mar 18 7:49 AM
Hi,
for the performance issue u hava to look up some stapes .
1. use internal table without header line.
( first structure then internal table .
data : < I tanble name > type standard table of < structure name > initial size 0.
2. Don't use select * , use required fields
3. don't use corresponding key word
4. from ST05 find out witch select statement is performance bad
5. use upper case letter
6. if performance bad then use secondary index.
7. avoid nested select statement.
Thaning uou,
subash.
2008 Mar 18 7:55 AM
Hi
You remove the duplicate entries from the EKPO and not use EBELP since these fields are not primary keys
also try use the primary keys from MSEG
You can use the table EKET (PO order History) to get the information which will be very fast
Try this and let me know
Regards
Shiva
2008 Mar 18 12:09 PM
Some small tuning that you can do:
1. Select the fields in the same order as in MSEG table.
2. Add this lines
Data: lt_ekpo type standard table of ekpo.
lt_ekpo[] = ekpo[].
sort lt_ekpo by ebeln ebelp.
delete adjacent duplicate from lt_ekpo comparing ebeln ebelop.
Now use this sorted and unique driver table to get data from MSEG.
Also seat with functional person and check if you can access MKPF first followed by MSEG. MKPF is the header table.
2008 Mar 22 6:51 AM
Dear Anand,
All the previous answers and recommendations are pretty good and should be realized specifically the table declaration (data: itab type standard table ...). I recognized an incorrect statement:
if not ekpo\[\] is initial. should be: if not iekpo[] is initial.
Heinz
2008 Mar 22 2:15 PM
In the coding i see that you have written ekpo and iekpo. Please decide whether youe internal table name is ekpo or iekpo.
Once you write the correct internal table it should work
2008 Mar 25 7:58 AM
Hi,
The program going for dump could be because the data is too much to be fiited into an internal table . Since you have selected on EBELN and EBELP which are not key fields of MSEG.
TRy using PACKAGE SIZE statement in your select clause. You will be able to restrict the number of records which come into your internal table.
Regards,
Soumya
2008 Mar 25 8:46 AM
Hi,
select mblnr
mjahr
menge
erfmg
erfme
ebeln
ebelp
from mseg
APPENDING table imseg
for all entries in iekpo
PACKAZE SIZE 20000
where ebeln = iekpo-ebeln and
ebelp = iekpo-ebelp.
ENDSELECT.
Change the package size according to your system performace
2008 Mar 25 9:33 AM
Hi,
Any select query for a biger table(more data) needs to use table index in the query.
Please check if any index defined for table MSEG suits your requirement else create an table index.
It will work. If a select query is not using any index defined in the table then it will automatically take loger time and goes to dump.
Regards
Sunil Kumar P
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |