Skip to Content
author's profile photo Former Member
Former Member

Creating an invoice for a single confirmation


I'm having a problem with invoices in our SRM implementation. It was decided that invoices will be produced by confirmation, not PO. Since there is no way that I know of to create an invoice for a single confirmation, the process is to create the invoice according to PO and then delete all items not related to the confirmation for which the invoice is produced.

That's not much of a problem when there are only a handful of confirmations, but some jobs have dozes, sometimes over a hundred confirmations. Only one item can be deleted at a time, which makes this very tedious.

I tried solving the problem by writing a piece of code which loops on the items and deletes them, but turns out that after each change done using class /SAPSRM/CL_PDO_BO_INV, method SUBMIT_UPDATE must be called, or else all changes are overwritten.

For example, if I have a 100 items invoice, I loop on them and call method DELETE_ITEM for each one, then after the loop call method SUBMIT_UPDATE, only item number 100 will be deleted. I need to submit the updates after every item deleted, which makes processing very long for such invoices - it often takes over 10 minutes.

Is there any way to create the invoice by confirmation number instead of PO number? If not, is there any way to delete multiple items at once, or perhaps a BADI I could use after clicking "Add PO" which will enable me to mark the unnecessary items for deletion?

Kind regards,

Itay Horev

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Posted on Aug 18, 2016 at 09:02 AM

    Hello Itay

    As far as I know the invoice should be possible to be created base on Selected PO item ,
    Could you please check if it is possible to create invoice by select the PO items you would like to add ?

    Yu Feng

    1.png (35.8 kB)
    Add comment
    10|10000 characters needed characters exceeded