cancel
Showing results for 
Search instead for 
Did you mean: 

How to identify a cancelled invoice?

Former Member
0 Kudos

Hi Gurus,

I am doing a program that takes invoices from EKBE Table, but I want to know if tinvoice is cancelled or not, otherwise I will not take it.

I have been checking all tables, and I haven´t found a flag or something that could tell me either the invoice is cancelled or not.

Is there a way to know it? A FM? Anything?

I hope you can help me. Thanks in advance.

Jocelyne

PS: I have found a way. Take the reference of the invoice and check on RBKP if there is another invoice with same reference and transaction type RS. But I think this is too much, and make my program slow...I dont know. What do you think?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

If the invoice is deleted before posting, you can may look for RBKP-RBSTAT = '2'. If the invoice is posted and then reversed, you can find an entry in table EKBE. Search for the entry with BEWTP = 'Q' (PO History Category) and SHKZG = 'H' (Debit/Credit Indicator) for the PO line.

Thanks,

Venu

Former Member
0 Kudos

Thanks guys.

raghavendra sai: The credit memo is created, but I am not looking for those. On my program I find invoice, and I want to know if there is a way to know with thw invoce number if it is cancelled. I dont want to look for the credit memos.

Venu Cherupillil: Our invoices are created and posted, so when I check RBKP-RBSTAT, it is '5'. The original invoice and the credit memo. And on EKBE I can not look it with BEWTP = 'Q' (PO History Category) and SHKZG = 'H' (Debit/Credit Indicator) , because I need to know the last invoice created for PO line, and if I look it with those points, it get me all the invoices, not the last.

Answers (2)

Answers (2)

Former Member
0 Kudos

go to t code : mir5, secect the check box " cancelation" under "Entry type" only.

is status section select the Posted check box and execute you can get list cancled invoices

Former Member
0 Kudos

Thanks for all. I have solved it with reading EKBE. Easy way. 😃

Former Member
0 Kudos

Hi,

We are also facing the same problem, If you can share with us the logic that will be helpful for us to conclude the things.

Actually we want to update the Cancelled IV doc. (Done via T-code - MR8M) as "Refernce Doc. No. - (Field - LFBNR)" against the Original IV Doc. in Table - EKBE.

Currently GR Doc. No. is updated in field - LFBNR (Reference doc) against all the line items of P.O. hence it is a cumbersome job to find cancelled IV in all the IV documents posted aginst the particular P.O.

If you had fetch the data by some other way then what is the logic you have developed ?

Thanks & Regards

Shridhar

former_member197616
Active Contributor
0 Kudos

Hi,

If a invoice is cancelled or reversed , a cancelled document called a credit memo will get created.You can identify with this transaction credit memo.This also you can get them in EKBE table.

Regards,