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: 

Inner Joins & for all entries

Former Member
0 Kudos

Hi

1) SELECT RSEGBUKRS RSEGBELNR RSEGGJAHR RSEGBUZEI RBKPLIFNR RSEGWERKS RSEGEBELN RSEGEBELP RSEGMATNR RSEGWRBTR RBKPRBSTAT RBKPZUONR RBKPRMWWR RBKPWAERS RBKP~KURSF

INTO TABLE I_RSEG

FROM RBKP

INNER JOIN RSEG

ON

RBKPBELNR = RSEGBELNR AND

RBKPGJAHR = RSEGGJAHR

FOR ALL ENTRIES IN I_BKPF

WHERE RBKP~BELNR = I_BKPF-BELNR

AND RBKP~GJAHR = I_BKPF-GJAHR

AND RSEG~WERKS IN S_WERKS

AND RBKP~LIFNR IN S_LIFNR.

2) IF NOT I_BKPF[] IS INITIAL.

SELECT belnr gjahr lifnr rbstat zuonr rmwwr waers kursf stblg

FROM rbkp into corresponding fields of table i_rbkp1

FOR ALL ENTRIES IN I_BKPF

WHERE BELNR = I_BKPF-BELNR

AND GJAHR = I_BKPF-GJAHR

AND LIFNR = S_LIFNR.

ENDIF.

I am replacing the first select statment using inner join with for all entries. but it is not yelding same result.First select statement retrieves records while second one does not using same where conditions. How inner join would work,can we replace inner join using for all entries.

Regards,

Karthik.k

1 REPLY 1

Former Member
0 Kudos

any one suggest..

Regards,

Karthik