0% found this document useful (0 votes)
6 views1 page

SAP Invoice and Payment Queries Guide

The document describes several SAP database queries to retrieve invoice, payment, order, and remaining value information. The GetSAPInvoice and GetSAPPayment queries select invoice and payment data from the RBKP and BSAK tables. The GetSAPDetails query joins the EKKO and LFA1 tables to return order details. The RemainingValue query sums the NETWR column for a given order from the EKAB table. The GetAllSAPInvoice query returns all invoices from the RBKP table.

Uploaded by

Rahul Singh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

SAP Invoice and Payment Queries Guide

The document describes several SAP database queries to retrieve invoice, payment, order, and remaining value information. The GetSAPInvoice and GetSAPPayment queries select invoice and payment data from the RBKP and BSAK tables. The GetSAPDetails query joins the EKKO and LFA1 tables to return order details. The RemainingValue query sums the NETWR column for a given order from the EKAB table. The GetAllSAPInvoice query returns all invoices from the RBKP table.

Uploaded by

Rahul Singh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

 GetSAPInvoice(BillRefNo,LIFNR(vendorCode))

select BELNR,BUDAT as BLDAT from [Link] where (KIDNO='" + BillRefNo + "' or


KIDNO='"+BillRefNo+"\\00000') and BUKRS='1000' and LIFNR= '" + LIFNR + "'

 GetSAPPayment(string BillRefNo,string LIFNR)


select BLDAT,AUGDT from [Link] where KIDNO like '" + BillRefNo + "%' and
BUKRS='1000' and LIFNR= '" + LIFNR + "' order by AUGDT desc

 GetSAPDetails(string WONo)

select [Link] as VendorCode,b.NAME1 as VendorName,KDATE as OrderValidity,RLWRT as


OrderValue,ZTERM,STCD3 from [Link] a inner join qas.LFA1 b on [Link] =
[Link] where [Link] = '" + WONo + "'

 RemainingValue(string WONo)

select sum(NETWR) from [Link] a where [Link] = '" + WONo + "'

 GetAllSAPInvoice()

select KIDNO,BELNR,BUDAT as BLDAT from RBKP where KIDNO!=' ' and BUKRS='1000'

You might also like