05-30-2007 1:31 PM
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
05-30-2007 1:47 PM