cancel
Showing results for 
Search instead for 
Did you mean: 

Logic to remove Cancelled Invoices and Sales Return from Sales Report

Former Member
0 Kudos

Hi,

I am making a Sales Report, where I am suppose to remove all Cancelled Invoices and Cancelled Return sales like S1 and S2. But I am not able to remove the Invoices and Return sales which are linked to these cancelled invoices and return sales. Kindly suggest the logic how to do this?

Thanks, Urgent.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Remove all the entry of VBRK table where filed FKSTO-VBRK = X,It will remove all cancelled invoice. For removing return sale Pass all entry of returning billing Doc to VBFA table in filed VBELV-VBFA & VBTYP_N=O. It will provide you are reffered billing document for creation of credit memo. Remove all these entry from sale register.

Hope this will help you.

Regards

Manjit DHiman

moazzam_ali
Active Contributor
0 Kudos

Hi Vicky

For cancelled billing documents you can use field VBRK-FKSTO. I have used this in Z reports and querty reports to exclude cancelled documents.

If you have billing document type F2 and you have cancelled it then there will be X in this field. For cancelled billing documents there is always different billing type which you can exclude by hard coding them in program or simply exclude VBRK-VBTYP = N and here N is cancelled invoices.

For sale returns I reccomend you not to exclude but convert the quantity and value fields in negative to show sales return separately. Just put an IF condition that if VBRK-FKART = RE then quantity and sales value multiply with -1. I am sorry I am not good in ABAP

Let me know if you need more assistance in this regard.

Thank$