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 data from cluster table

Former Member
0 Likes
3,018

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.

9 REPLIES 9
Read only

Former Member
0 Likes
1,582

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

Read only

0 Likes
1,582

Thanks Ravi,

But "For All Entries" is used with internal tables. How to use with the 3 tables?

Any Examples?

Read only

0 Likes
1,582

select your values form the kna1 and bkpf into to internal table and then use for all-entries with bseg.

Regards,

Wasim Ahmed

Read only

0 Likes
1,582

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.

Read only

Former Member
0 Likes
1,582

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>...

Read only

andreas_mann3
Active Contributor
0 Likes
1,582

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

Read only

abdul_hakim
Active Contributor
0 Likes
1,582

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

Read only

Former Member
0 Likes
1,582

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

Read only

Former Member
0 Likes
1,582

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