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?
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. Please check this for a general understanding of this RD04 output. The tax code at the line item level of the accounting document is field BSEG-MWSKZ.
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.
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:
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’.
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.
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
- 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.
2. Set breakpoint accordingly at FM: IDOC_OUTPUT_INVOIC_IV_MM, it’ll be triggered using standard program RSNAST00 with parameters like below:
3, After Idoc has been generated will get the below message. After that, it’ll be processed as an inbound IDoc.
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. Check more at sector ‘About Debug Idoc related to RD04’ of my previous blog.