Skip to Content
0

BADI ACC_DOCUMENT selective tax line creation

Feb 27, 2017 at 08:02 PM

255

avatar image
Former Member

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).

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Pablo Casamayor Feb 28, 2017 at 09:24 AM
0

Hi,

have you read this blog?

FI Posting: Tax Lines generation with ACC_DOCUMENT Posting

Regarding your question maybe you could filter with field ACCHD-AWTYP

In the documentation of the badi there is this:

Requirements

You need to enter the reference transaction (sender document) as the filter type during implementation (AWTYP or OBJ_TYPE in parameter DOCUMENTHEADER of the BAPI interface).

see for instance this estandard implementation of the badi:

Best regards,

Pablo


Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Apr 06, 2017 at 02:18 AM
0

Hi Dan,

Are you experiencing problems while generating tax lines via Idoc ?

Share
10 |10000 characters needed characters left characters exceeded