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

Abap and SQL Request (BKPF / BSEG)

thillu
Explorer
0 Likes
1,244

Hello, I'm beginner in Abap and I have a question about a query on the table BKPF and BSEG.

I need the list of accounting documents (BKPF) which have accounting entry for a project given in parameter (Field Projk of table BSEG).

Since it's impossible to make a "JOIN" with tables BKPF and BSEG, how can I write my SQL query ?

2 REPLIES 2
Read only

DoanManhQuynh
Active Contributor
0 Likes
923

You may using sub ledger tables that comprise BSEG:

BSIS/BSAS - open/cleared items for G/L
BSIK/BSAK - for vendors
BSID/BSAD - for customers

or you can select from BSEG to internal table then use FOR ALL ENTRIES to select from BKBF.

Read only

0 Likes
923

It works, I made it with BSEG to internal table and FOR ALL ENTRIES to select from BKBF.

Thanks a lot !