‎2007 Feb 13 6:13 PM
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
‎2007 Feb 13 7:06 PM
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
‎2007 Feb 13 9:42 PM
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
‎2007 Feb 13 10:33 PM
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?
‎2007 Feb 13 10:41 PM
Hi Krisna,
BAPI 'BAPI_AP_ACC_GETOPENITEMS' has input parameter as Company code.
Please check the same.
Cheers,
Vikram
‎2007 Feb 13 10:49 PM
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
‎2007 Feb 13 11:33 PM
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
‎2007 Feb 13 11:33 PM
‎2007 Feb 14 3:24 PM
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!!