您的位置:首页 > 其它

Find table of Invoice History

2008-12-17 14:21 99 查看
if (window.name != "content")
document.write("
Click here to show toolbars of the Web Online Help System: show toolbars
");

Find table of Invoice History

Posted By Ralph Klassen On Monday, January 19, 2004 at 11:03 AM from IT-Toolbox http://sap.ittoolbox.com
Q:

Does anyone know of a table holding logistics invoice documents other than the BSEG? I need to extract all invoices against purchase orders and am trying to find the most efficient way. Any help would be greatly appreciated.

A:

Start by selecting from EKBE where EBELN = your PO and EBELP = your PO item (if you have it). This will give you the PO history that you see in ME23N.

The field EKBE-VGABE identifies the type of document. I think you want to look for a '1' in this field for a goods receipt and a '2' for invoice receipts. Verify this by browsing EKBE using SE1/SE16 at the same time you are looking at a PO in ME23N. If all you are concerned with are the vendor postings then you can limit yourself to the invoice receipts. If you need to retrieve the expense side of the G/L coding then you need the goods receipts as well.

For each record that you retrieve from EKBE:

concatenate EKBE-BELNR and EKBE-GJAHR

if EKBE-VGABE = '1'
select from BKPF where AWTYP = 'MKPF' and AWKEY = (EKBE-BELNR and
EKBE-GJAHR)

if EKBE-VGABE = '2'
select from BKPF where AWTYP = 'RMRP' and AWKEY = (EKBE-BELNR and
EKBE-GJAHR)

I'm not sure if this will work for parked documents but my guess is 'yes it will'.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: