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

SELECT QUERY PROBLEM

Former Member
0 Likes
511

Dear all,

I need to fetch data from MSEG table by passing eblen and where movement type is 105, 106, 124, 125.

i use the select query like.

but here i am not geting all the data which is matched with 105 movement type. In the sence one record is missing.

please help me on this.........

IF IT_EKKO IS NOT INITIAL.

SELECT MBLNR

BWART

MATNR

WERKS

LGORT

CHARG

SHKZG

MENGE

ERFME

FROM MSEG

INTO TABLE IT_MSEG

FOR ALL ENTRIES IN IT_MSEG1

WHERE EBELN = IT_EKKO-EBELN

AND BWART IN ('105', '106', '124', '125').

ENDIF.

Best Regards

margani

3 REPLIES 3
Read only

PedroGuarita
Active Contributor
0 Likes
485

FOR ALL ENTRIES IN IT_MSEG1

Change this instruction to

FOR ALL ENTRIES IN IT_EKKO

Read only

Former Member
0 Likes
485

Hi,

Change for all entries statement as

FOR ALL ENTRIES IN IT_EKKO

Regards

Vinod

Read only

Former Member
0 Likes
485

Moderator message - duplicate post locked Rob