Application Development 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: 

Report - Time out Error when Joining EKPO & MSEG

Former Member
0 Kudos
76

Hi All,

This is my code:

SELECT EKKO~EBELN

EKKO~LIFNR

EKKO~BUKRS

EKKO~EKORG

EKPO~EBELP

EKPO~TXZ01

EKPO~MATNR

EKPO~MENGE

EKPO~MEINS

EKPO~UNTTO

EKPO~PSTYP

FROM EKKO

INNER JOIN EKPO ON

EKKOEBELN = EKPOEBELN

INTO TABLE T_EKPO

UP TO P_MAX ROWS

WHERE EKKO~EBELN IN S_EBELN

AND EKKO~BSART IN S_BSART

AND EKKO~LIFNR IN S_LIFNR

AND EKKO~EKORG IN S_EKORG

AND EKKO~EKGRP IN S_EKGRP

AND EKKO~BEDAT IN S_BEDAT

AND EKPO~MATNR IN S_MATNR

AND EKPO~WERKS IN S_WERKS

AND EKPO~MATKL IN S_MATKL

AND EKPO~PSTYP IN R_PSTYP

AND EKPO~KNTTP IN S_KNTTP.

SELECT MBLNR

ZEILE

ERFMG

EBELN

EBELP

FROM MSEG

INTO TABLE T_MSEG

FOR ALL ENTRIES IN T_EKPO

WHERE EBELN = T_EKPO-EBELN

AND EBELP = T_EKPO-EBELP.

Now i am getting time out error. Can Any one suggest how can i solve this issue.

2 REPLIES 2

ThomasZloch
Active Contributor
0 Kudos
26

Identical problem by different (?) user:

0 Kudos
26

is it enough to create a secondary index on EBELN & EBELP or do i inlcude the fields MBLNR ZEILE & ERFMG also.