08-24-2010 1:01 PM
Time_out Dump error is coming while selecting fields from EKBE. in Where condition, 2 primary keys GJAHR and BELNR have been used. Whether I should go for creating new seconday indices or not?
08-24-2010 1:07 PM
What about key fields EBELN, EBELP, ZEKKN, VGABE and BUZEI? Have you used any of them in your select statement?
pk
08-24-2010 1:12 PM
SELECT ebeln gjahr belnr FROM ekbe
INTO TABLE lt_ponum
FOR ALL ENTRIES IN lt_awkey
WHERE gjahr = lt_awkey-gjahr
AND belnr = lt_awkey-belnr.
08-24-2010 1:16 PM
Wrong access path, if you have the material document number and want the PO number, try going via table MSEG. Please make yourself familiar with basic performance concepts like providing index key fields in your where-condition top down without gaps as much as possible.
Thomas
08-24-2010 1:19 PM
Hi,
try this way...
and check any indexes are available otherwise try to create index to take less time.
"add this condition
IF it_ponum[] is not initial.
SELECT ebeln gjahr belnr FROM ekbe
INTO TABLE lt_ponum "check the table it_ponum is initial or not
FOR ALL ENTRIES IN lt_awkey
WHERE gjahr = lt_awkey-gjahr
AND belnr = lt_awkey-belnr.
ENDIF.
Prabhudas
Edited by: Rob Burbank on Aug 24, 2010 9:01 AM
08-24-2010 1:30 PM
Hi,
If this is your code,
SELECT ebeln gjahr belnr FROM ekbe
INTO TABLE lt_ponum
FOR ALL ENTRIES IN lt_awkey
WHERE gjahr = lt_awkey-gjahr
AND belnr = lt_awkey-belnr.
Better you will go to RSEG for getting the PO and item for the given belnr and gjahr. And if you want to use the table EKBE means try the following logic.
SELECT p~EBELN p~EBELP p~GJAHR p~BELNR p~BUZEI
FROM EKBE AS p
INNER JOIN RSEG AS s
ON s~BELNR EQ p~BELNR
AND s~GJAHR EQ p~GJAHR
AND s~ebeln EQ p~ebeln
AND s~ebelp EQ p~ebelp
INTO corresponding fields of TABLE t_inv_details
FOR ALL ENTRIES IN lt_awkey
WHERE s~gjahr = lt_awkey-gjahr
AND s~belnr = lt_awkey-belnr.
I hope you will not get time out error.
08-24-2010 1:19 PM
08-24-2010 2:47 PM
EKBE can be very large, and as you don't give the first primary keys, the SQL optimizer can use a very bad decision and read the whole table.
EKBE records can be easier found via other tables (check domain VGABE values)
- MKPF/MSEG
- RBKP/RSEG
- BKPF/BSEG
- LIKP/LIPS
- ESSR
Which may give better performance (not BSEG of course)
So
- Which kind of record do you want to find,
- What are your original input (how do you fill lt_awkey)
Regards,
Raymond