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: 

iterating through bseg line items and picking the vendor line item

Former Member
0 Kudos

Hello,

I am creating a report in which i want to show the list of vendors (with their WHT's). The output will be based on selection of a certain period(range). I guess i have to first iterate through BKPF and get those documents that lie in the given range, then i 'll have to iterate through the selected documents in BSEG and pick out the vendor line items (KOART = 'S'). Will i be using GET for this..

Is this the right way? secondly, if yes, can sumone show me how to iterate through BKPF and BSEG and get vendor details.?

Thanks..

SHehryar

6 REPLIES 6

naimesh_patel
Active Contributor
0 Kudos

hello,

GET will not work for the BSEG.

If you want to use the LDB then see the program RFITEMAP. LDB KDF is used in this report. Tables used are bsik, bsak.

Other option is:

Go to BKPF, Select the compancy, document year, number.

Pass this to BSEG and retrive the data where KOART = 'K'.

regards,

Naimesh

0 Kudos

Hello,

Are all the open and cleared items kept in BSEG?

0 Kudos

oh okay. understood abt the open n cleared items.

0 Kudos

Hello,

Naimseh: the program 'RFITEMAP' looks kinda complex. Can u or anyone write down the steps neeeded for my program

Thanks..

Former Member
0 Kudos

Hey,

Instead of selecting data from BKPF-BSEG you could use BKPF-BSIK-BSAK.

BSIK and BSAK have the same details as BSEG and are use by SAP for reporting purposes.

Similarly for customer the table are BSID, BSAD and for GL the tables are BSIS and BSAS.

BSIK will have the open items and BSAK will have the cleared items.

-Kiran

dani_mn
Active Contributor
0 Kudos

HI,

for posted document used.

<b>BKPF and BSEG.</b>

for parked documents used.

<b>vbkpf

vbsegk

vbsegs</b>

Regards,

Wasim Ahmed