Skip to Content
0
Former Member
Feb 27, 2017 at 08:02 PM

BADI ACC_DOCUMENT selective tax line creation

1422 Views

Our scenario is we are receiving notification that an invoice needs to be created for a customer into SAP PO. We map this to a ACC_DOCUMENT IDoc - Creating the GL line, Accounts receivable lines and the currency lines. We maintain the tax code in the line items and is mapped from the external system where there is the potential for tax exempt lines.

Up to this stage everything works as expected, but we need to be able to generate a tax line for the document. We dont want to do this in PO so we are going to implement BADI ACC_DOCUMENT and use the change method in order to create a tax line for the line items.

Now my question is, as the filter for this BADI will be BKPFF - Is there a way we can distinguish which of these documents passing through the BADI have come via the ACC_DOCUMENT IDoc?

I am assuming here that the BAPI_ACC_DOCUMENT_POST has the potential to be called via internal processes as well (Finance team also manually key invoices) so dont want this tax logic to be applied to all documents passing through the BADI code (Assuming of course keying these manually triggers the BADI).