Certification of SAP External Tax Interface Integration with S4 1511 Resolution of posting duplicate entries to ONESOURCE Tax Determination Audit

In the process of getting the external tax interface certified by SAP on S/4 HANA, Thomson Reuters has performed the Central Finance test case successfully without duplicating the audit entries in external tax system. However, this process requires some user-exit code being applied to your central finance system.
When a financial document is created in the SAP source system and replicated to Central Finance system, it initiates an RFC update from the Central Finance system. This causes the issue of 2 duplicate entries in the ONESOURCE audit database, one from the SAP source system and one from Central Finance.
Avoid an audit update from Central Finance. When the document is posted in central finance it makes a tax call to update audit database. Just like any tax call it hits tax user exit EXIT_SAPLFYTX_USER_001. Hence as part of the solution we are passing value REPL through this user exit if the document being processed is replicated one. We will then implement a ONESOURCE TransEditor to switch the call from an audited call to a calculation call only. How to determine if the document is replicated one and not one originated in central finance (these documents would require to be audited in ONESOURCE)?
  • In the user exit call FM OWN_LOGICAL_SYSTEM_GET to retrieve current logical system.
  • Retrieve sender systems logical system by assigning the XBKPF-LOGSYSTEM_SENDER from the program SAPLFACI from call stack.
  • Check if senders logical system is
    not
    equal to current systems logical number, if thats true then pass REPL to one of the ZZATTRIBUTE fields.
ONESOURCE external tax system configuration
  • Create a TransEditor that checks if the USER_ATTRIBUTE has value REPL, then switch the IS_AUDIT flag to false or N.
Code samples: Sample code in user exit EXIT_SAPLFYTX_USER_001 would look something like this FIELD-SYMBOLS:<sender_log_sys>TYPEany. * DATA:ls_logsysTYPEtbdls-logsys.
CALLFUNCTION'OWN_LOGICAL_SYSTEM_GET' IMPORTING own_logical_system=ls_logsys EXCEPTIONS own_logical_system_not_defined=1 OTHERS=2. IFsy-subrc<>0. *Implementsuitableerrorhandlinghere ENDIF.
ASSIGN('(SAPLFACI)XBKPF-LOGSYSTEM_SENDER')TO<sender_log_sys>. IF(<sender_log_sys>isASSIGNEDAND<sender_log_sys>NEls_logsysAND<sender_log_sys>ISNOTINITIAL)."OR<sender_log_sys>. ch_user_changed_fields-zzattribute1='REPL'. ENDIF. TransEditor would look like this: