This website is not affiliated with, sponsored by, or approved by SAP AG.

Query/SQ01 Total amount by Invoice

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Query/SQ01 Total amount by Invoice

Postby carlosreis3 » Tue Apr 21, 2015 2:48 am

Hello,

Does anyone know a way to calculate the total amount of an Invoice?
I am trying to develop an SQ01 using BSEG table but i am lack of ideas and struggling to do something.

(Company Code, Doc Number, Year, Doc Type, Period, Time, Username, Reference, Document Header Text, Crcy, Local Curr, Doc. Date, Pstng Date, Entry Dte)


Any help/assistance please.

regards,
CR
carlosreis3
 
Posts: 18
Joined: Tue Nov 04, 2014 10:23 am

Re: Query/SQ01 Total amount by Invoice

Postby Frank Lai » Tue Apr 21, 2015 11:14 am

Hi

Not sure why you want to start with BSEG if you are trying to get invoice totals. Suggest you consider either table VBRK or logical database VFV ( Unless you have invoices that by pass SD and goes directly into FI such as agency business documents).

If you must use BSEG then you must also include the header table BKPF so that you can filter by accounting document types to only include invoices.

Frank
Frank Lai
 
Posts: 1704
Joined: Mon Oct 21, 2002 8:03 am
Location: Canada

Re: Query/SQ01 Total amount by Invoice

Postby carlosreis3 » Tue May 12, 2015 3:13 am

Hi Frank,

indeed that's the case "have invoices that by pass SD and goes directly into FI such as agency business documents", i managed to calculate the net amount, so far OK, now i am working on the Gross amount it should me more easier i believe, just trying to find the taxes etc fields o add in the calculation operation.

regards,
CR
carlosreis3
 
Posts: 18
Joined: Tue Nov 04, 2014 10:23 am

Re: Query/SQ01 Total amount by Invoice

Postby Frank Lai » Thu May 14, 2015 8:22 am

Hi

OK, if you just want to invoice total amounts, you probably only want the amounts that are posted to you customer's account in the AR sub-ledger which means you only want account type (BSEG-KOART) = 'D'. Also pay attention to the debit/credit indicator (BSEG-SHKZG). The tax amounts are in BSEG in both document and logical currency. Should not be hard to find.

Frank
Frank Lai
 
Posts: 1704
Joined: Mon Oct 21, 2002 8:03 am
Location: Canada


Return to ABAP

Who is online

Users browsing this forum: Exabot [Bot] and 8 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.