Avalados por :

Debugging Hints for SAP MIRO Invoice Creation: Step-by-Step Guide

  • Creado 01/03/2024
  • Modificado 01/03/2024
  • 69 Vistas
0
Cargando...

Hello All,



After talking to some customers and getting feedback about documentation, one of the points mentioned was the need for more information about debugging hints in the SAP transactions.


Thinking about this, I realized I'm always debugging 😎, but, until now, I never created documentation describing how to debug transactions in the Procurement area.


Therefore, this post is special with debugging hints for those who work with invoice creation using MIRO.



One of the main scenarios I usually debug is the integration between MM and FI, where common questions are:


A. What IV sends to FI?


B. What FI sends back to IV?


C. Is IV or FI responsible to generate a specific line in the subsequent FI document?



In order to know the answers to all of these questions, two important breakpoints should be set inside the function module MRM_INVOICE_POST :


1. The first breakpoint needs to be set in the call of function module CKMV_AC_DOCUMENT_CREATE .


2. The second breakpoint needs to be set right after the call of this same function.


See the screenshot with the breakpoints:



During MIRO execution, these breakpoints will be called when you choose Simulate button.


Basically, as the comment in the code says, when function module MRM_INVOICE_POST calls function module CKMV_AC_DOCUMENT_CREATE , this is the calling to the accounting interface.



TIP: Always read the comments in the code, it can clarify potential questions!



Some hints when you start your debug session:




  • When the system stops at the first breakpoint, you will see everything that IV is sending to FI (this is the answer to question A 😊).

    • Just keep in mind that not all lines are calculated by IV at this point. For example, the tax lines (transaction key = VST) are calculated in a step before by FI, in the function module CALCULATE_TAX_DOCUMENT .



  • If you hit F8, the system stops in the next breakpoint, where you can see everything that FI changed in the IV information and/or what FI added to the IV information (this is the answer to question B 😉).

    • In general, you will see here additional lines, such as the withholding tax lines (WIT) calculated by FI, or, modifications caused by FI substitutions. You can also see additional lines generated by CO.





Sometimes, I have to analyze why a FI document is posted with the wrong G/L account, or why a G/L account line is presenting wrong values.


For this, I set the mentioned breakpoints and I simulate a new invoice in MIRO.


Once the system stops in the first breakpoint:




  • I open XACCIT : this internal table keeps the item information from the accounting interface.


From this table I collect the data from the following fields:


- POSNR = Accounting Document Line Item Number


- KTOSL = Transaction Key


- SAKNR = G/L Account Number




  • Then, I open XACCCR : this internal table keeps the currency information from the accounting interface.
    Pedro Pascal
    Se unió el 07/03/2018
Pinterest
Telegram
Linkedin
Whatsapp

Sin respuestas

No hay respuestas para mostrar No hay respuestas para mostrar Se el primero en responder

contacto@primeinstitute.com

(+51) 1641 9379
(+57) 1489 6964

© 2024 Copyright. Todos los derechos reservados.

Desarrollado por Prime Institute

¡Hola! Soy Diana, asesora académica de Prime Institute, indícame en que curso estas interesado, saludos!
Hola ¿Puedo ayudarte?