Friday 25 March 2022

About EDI conversion of External tax rate and tax code

The transaction OBCD is a standard transaction to maintain EDI conversion of External tax rate and tax code and its corresponding Maintenance table is T076M. It’ll impact the tax code if the FI accounting document is created through EDI (which is IDOC normally). Now, what if the tax code is not been assigned correctly as expected on the posted document created by IDOC?

SAP ABAP Exam, SAP ABAP Exam Prep, SAP ABAP Preparation, SAP ABAP Career, SAP ABAP Jobs, SAP ABAP Skills, SAP ABAP PDF

How to check the source of the tax code?


In my case, the account document was triggered by intercompany billing with standard output type RD04.

SAP ABAP Exam, SAP ABAP Exam Prep, SAP ABAP Preparation, SAP ABAP Career, SAP ABAP Jobs, SAP ABAP Skills, SAP ABAP PDF

The account document is generated through inbound IDOC using message type ‘INVOIC’ with the basic type ‘INVOIC01’. The process code ‘INVF’ uses the standard function ‘IDOC_INPUT_INVOIC_FI’ for inbound processing. Global search ‘BSEG-MWSKZ’ at this FM will find out its source comes from E1EDP04-MWSKZ.

SAP ABAP Exam, SAP ABAP Exam Prep, SAP ABAP Preparation, SAP ABAP Career, SAP ABAP Jobs, SAP ABAP Skills, SAP ABAP PDF

The standard approach to fetch tax code


Normally the routine ‘READ_T076M’ been used to get the tax code from the T076M table which is exactly the maintenance against transaction OBCD:

SAP ABAP Exam, SAP ABAP Exam Prep, SAP ABAP Preparation, SAP ABAP Career, SAP ABAP Jobs, SAP ABAP Skills, SAP ABAP PDF

Enhancement may impact the tax code


But attention here is one BADI called ‘INVOIC_FI_INBOUND’ been checked using METHOD: IF_EX_INVOIC_FI_INBOUND~DETERMINE_TAX_CODE ahead of ‘READ_T076M’.

SAP ABAP Exam, SAP ABAP Exam Prep, SAP ABAP Preparation, SAP ABAP Career, SAP ABAP Jobs, SAP ABAP Skills, SAP ABAP PDF

Besides IDOC inbound processing for document generation, the IDOC generated by function module ‘IDOC_OUTPUT_INVOIC_IV_MM’, global search ‘e1edp04’ will find the fill routine ‘fill_e1edp04′ and its user exit inside ‘customer_function’ could have impacts for this value as well.

SAP ABAP Exam, SAP ABAP Exam Prep, SAP ABAP Preparation, SAP ABAP Career, SAP ABAP Jobs, SAP ABAP Skills, SAP ABAP PDF

For this case, e1edp04–mwskz comes from ikomv–mwsk1 which mapping to table KONV-MWSK1 with KONV-KSCHL equal to MWST.

How to debug this Idoc generation


1. As the IDOC type ‘INVOIC’ can be re-triggered, just modify output at one invoice and set dispatch date/time with option ‘1’ which is Send with a periodically scheduled job.

SAP ABAP Exam, SAP ABAP Exam Prep, SAP ABAP Preparation, SAP ABAP Career, SAP ABAP Jobs, SAP ABAP Skills, SAP ABAP PDF

2. Set breakpoint accordingly at FM: IDOC_OUTPUT_INVOIC_IV_MM, it’ll be triggered using standard program RSNAST00 with parameters like below:

SAP ABAP Exam, SAP ABAP Exam Prep, SAP ABAP Preparation, SAP ABAP Career, SAP ABAP Jobs, SAP ABAP Skills, SAP ABAP PDF

3. After Idoc has been generated will get the below message. After that, it’ll be processed as an inbound IDoc.

SAP ABAP Exam, SAP ABAP Exam Prep, SAP ABAP Preparation, SAP ABAP Career, SAP ABAP Jobs, SAP ABAP Skills, SAP ABAP PDF

How to debug this Idoc inbound processing


To test the inbound process FM: ‘IDOC_INPUT_INVOIC_FI’, just use SE19 with Inbound FM and check the box of ‘Call in debugging mode.

SAP ABAP Exam, SAP ABAP Exam Prep, SAP ABAP Preparation, SAP ABAP Career, SAP ABAP Jobs, SAP ABAP Skills, SAP ABAP PDF

Source: sap.com

No comments:

Post a Comment