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

AP open items data

Former Member
0 Likes
5,355

Hi gurus,

Here i have to extract data related to ACCOUNTS PAYBLE OPEN ITEM DATA for that i have to extract Header data , item data, and vendor data, bank details.....so pls advice me from how many tables i have to take data ...

I knew some thing like BKPF,BSEG,BSIK,LFA1,LFBK,,,,is this correct or

i have to take from BSIK for open items ,,some of the fields are avilabel in BSIK,but again i have to go to BSEG,,,,,,some fileds avilabe in this table ....pls ADVICE ME.....

Thanks

KRISNA

8 REPLIES 8
Read only

Former Member
0 Likes
2,645

Use this BAPI :

BAPI_AP_ACC_GETOPENITEMS

Short text

Vendor Account Open Items at a Key Date

Functionality

This method lists a vendor's open items at a given key date. If you so wish, noted items can also be selected for display.

Parameter

COMPANYCODE

VENDOR

KEYDATE

NOTEDITEMS

RETURN

LINEITEMS

Thanks,

Santosh

Read only

0 Likes
2,645

Hi ,

I have to get data based on COMPANY CODE like BUKRS = US10 and CS11.

so how can i pass these values to BAPI.....

Thanks

KRISNA

Read only

0 Likes
2,645

hello,

You can also write select statements on tables BSIK(Open items) and BSAK(Cleared items). For these tables you could pass BUKRS value in where clause. The above BAPI function must be using the same tables.If you have the Vendor information (LIFNR) you write select query on LFA1(vendor master) and LFBK(Vendor Bank details) using LIFNR in the where clause.You may want to look at the source code for the above function module and write your select query similar to that. Is this what you are looking for?

Read only

Former Member
0 Likes
2,645

Hi Krisna,

BAPI 'BAPI_AP_ACC_GETOPENITEMS' has input parameter as Company code.

Please check the same.

Cheers,

Vikram

Read only

Former Member
0 Likes
2,645

Hi,

You need to supply Company Code, Vendor and Key date as mandatory inputs. so loop for all the valid Company codes/Vendor as per your selection criteria and input into the import parameter for BAPI_AP_ACC_GETOPENITEMS.

Cheers,

Vikram

Read only

0 Likes
2,645

Hi Vikram,

Here my criteria is based on the COMPNAY CODE not for vendor ,key date....only company code.....but BAPI is looking for the inputs BUKRS, VENDOR,KEYDATE.....IF I CALL that BAPI how can i pass the VENDOR ,KEY DATE......I CAN ONLY PASS THE company code.....in this case what to do....i have to go for manual coding writing all select statements on BKPF,BSIK,BSEG,LFA1,LBK...IS this only chioce.....

Thanks

KRISNA

Read only

0 Likes
2,645

I cant use BAPI....?

thanks

krisna

Read only

Former Member
0 Likes
2,645

Hi Krisna,

Even in std transdaction code FBL1N, you need to provide comp. code,vendor #, keydate.

But since you have company code only, you can retrive all the relevant vendors for that comp. code using select from table LFB1.

You can pass these vendors alongwith the given comp. code to the BAPI through a loop.

For keydate, by default it should be current system date so set it to system date.

Hope this would be of help.

Cheers,

Vikram

Mark for helpful replies!!