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

Time_out error in EKBE selection

Former Member
0 Likes
1,111

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?

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?

7 REPLIES 7
Read only

Former Member
0 Likes
1,023

What about key fields EBELN, EBELP, ZEKKN, VGABE and BUZEI? Have you used any of them in your select statement?

pk

Read only

0 Likes
1,023

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.

Read only

0 Likes
1,023

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

Read only

0 Likes
1,023

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

Read only

0 Likes
1,023

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.

Read only

Subhankar
Active Contributor
0 Likes
1,023

Hi,

You can check the SAP Note 191492.

Thanks

Subhankar

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,023

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