‎2006 Jun 02 11:10 AM
Hi all,
Is there any method joining the BSEG, BKPF and KNA1 tables?
I want to select some customer who has an accounting doc in BKPF.
Thanks.
‎2006 Jun 02 11:12 AM
YOu cannot join Cluster tables, You have to select them indivudally and loop through the internal table or use the FOR ALL ENTRIES clause for the subsequent tables.
There is no other go.
Regards,
Ravi
Note :Please mark the helpful answers
‎2006 Jun 02 11:19 AM
Thanks Ravi,
But "For All Entries" is used with internal tables. How to use with the 3 tables?
Any Examples?
‎2006 Jun 02 11:22 AM
select your values form the kna1 and bkpf into to internal table and then use for all-entries with bseg.
Regards,
Wasim Ahmed
‎2006 Jun 02 11:25 AM
Is there any method joining the BSEG, BKPF and KNA1 tables?
You can INNER JOIN KNA1 and BKPF first with your conditions and select it to an internal table.
Use FOR ALL ENTRIES for BSEG selection with the above internal table.
Cheers,
Thomas.
Please mark points if useful.
‎2006 Jun 02 11:15 AM
ya by using kunnr(Customer Number 1) from kna1.
u find the information abt customer...
and for account doc number..
by using this kunnr u can get BELNR(Accounting Document Number) from BSEG..
<b>join b/w bseg and bkpf is not possible</b>...
‎2006 Jun 02 11:25 AM
hi,
there're extra tables to improve the performance for fi-documents - for customer: bsid, bsad
and there are existing views in standard - one is VF_DEBI
regards Andreas
‎2006 Jun 02 11:25 AM
hi macy,
you cannot use join for cluster tables.
you can fetch data from cluster table and then based on the result you could use FOR ALL ENTRIES addition for doing other validation from the other tables.There is no other go..
Cheers,
Abdul Hakim
Mark all useful answers
‎2006 Jun 02 11:59 AM
Hi Macy,
which Information do you need from BSEG, BKPF, KNA1.
Sometimes you can Use BSID or BSAD. They are faster to
select than BSEG.
Regards, Dieter
‎2006 Jun 02 12:02 PM
Hi
If you want to select the account document of a customer it should be better to use the secondary index table for customer accounting BSID (open item) and BSAD (cleared item) instead of use BSEG table.
Max