Skip to Content
0
Sep 09, 2009 at 05:02 AM

To remove line items from invoice which have 0 qty.

113 Views

Dear Friends,

Requirement: To remove line items from invoice which have 0 qty.

For this I wrote the code in RV60AFZZ. It is very well happening, but when last line item comes it is failing.

What I have written is " DELETE XVBRP WHERE FKIMG = '0' ." . This code is deleting all the line items with 0 qty except last line item.

Actually, this exit works line item wise. Once the line item is appended, the code what I have written is working. For the last line item, record is not appended when this exit is triggerred, thats why last record is not deleted.

The include where all line items are getting appended in XVBRP is LV60AB03. I modified this also. Same code I have written here to delete the records once it is appended. But after doing this the problem is - invoice is not getting created.

Please help me in doing this so as to delete this last record also. I tried with other logics also, not able to track the last record.

Please help me to resolve this problem.

Thanks.