cancel
Showing results for 
Search instead for 
Did you mean: 

Last invoice date and amount, Last payment date and amount

Former Member
0 Kudos

Hello SDNs,

How we can find out the last invoice date and amount, Last invoice payment date and amount for particular customer.

How i can design the logic for above scneario.

Please help me in this.

Thanks in advance

Regards,

K

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks for your information

Jelena
Active Contributor
0 Kudos

If you're an ABAPer or are writing the requirements for an ABAPer then I'd recommend the following:

1) Invoice date / amount. Try using table VRKPA to search by KUNNR (Customer #). This will be much faster than reading just VBRK (VBRK could be JOINed to get more details). One note - make sure that this table is populated for the partner type in question. Usually it is populated for the Sold-to, but it depends on the configuration.

Not sure what's your definition for "last", but I'd guess you could search for an invoice with the highest number. There are many dates, so I'm not sure which one you need. VRKPA-FKDAT (or VBRK-FKDAT) is the billing date. VBRK-NETWR is the net amount (without taxes).

2) Payment - this depends on your configuration and process. You'll need to look at the tables BSID/BSAD (one of them contains cleared items). These are FI tables, they may be linked back to SD document by ZUONR or XBLNR, or example - check your data. Payments usually have the document type DZ.

Lakshmipathi
Active Contributor
0 Kudos
last invoice date and amount

TCode::::::VF05 / VF05N

Last invoice payment date and amount

TCode::::::FBL5N

If you want to club the above transactions, create a query in SQVI by table joining VBRK for invoice date and amount and BSAD for payment details

thanks

G. Lakshmipathi