Pulling the tax request and response from SAP

How to find the XML that SAP sent to an external tax engine, and the response it got back, for one document, using the connector’s log reader. Then what to look at first.

By Herb Park, Clarent Technologies

In an SAP system with an external engine, the tax on a document is whatever the engine returned for it. When it is wrong or missing, the request and response tell you whether SAP sent the wrong facts or the engine applied the wrong rule. The steps below use the ONESOURCE Indirect Tax connector for SAP, whose log reader is transaction /IDT/LOG. Other connectors have their own log transactions with similar selection fields.

Open the log reader

Enter /n/IDT/LOG in the command field. You need authorization for the transaction in the right system and client.

Enter the selection

FieldWhat to enter
Document numberThe SAP document number (billing document, accounting document, purchase order).
Company codeAlways fill this in. The same document number exists in many company codes.
Log dateA range around when the issue happened. It keeps the search fast.
User name (optional)For example the interface user that posted the document.
Search string (optional)Text inside the XML, such as a material number or postal code.

Leave message filtering off so you see every call, then execute (F8).

Three fields narrow the log to one document A log reader selection filled in for one billing document (illustrative). Company code and a tight date range do most of the work.
  • Document number: 90012345
  • Company code: US01
  • Log date from: 2026-10-14
  • Log date to: 2026-10-16
  • User name:
  • Search string:
  • Message filtering: Off
  • Execute (F8)
  • (1) The SAP document number: billing document, accounting document or purchase order.
  • (2) Always filled in. The same number exists in other company codes.
  • (3) A few days around the issue keeps the search fast.
  • (4) Left off, so every call is listed.

Pick the right rows

Each call is a pair of rows, and a document has several calls The result list for one document (illustrative). Rows come in pairs, one pair per call, and the pair at release to accounting is the one with the error.
  • Counter: 4411; Date: 2026-10-15; Time: 08:40:12; Company: US01; Row: Request; Call: Billing; Errors:
  • Counter: 4412; Date: 2026-10-15; Time: 08:40:14; Company: US01; Row: Response; Call: Billing; Errors:
  • Counter: 4487; Date: 2026-10-15; Time: 09:05:31; Company: US01; Row: Request; Call: Release to accounting; Errors:
  • Counter: 4488; Date: 2026-10-15; Time: 09:05:33; Company: US01; Row: Response; Call: Release to accounting; Errors: 1
  • 4 rows, 2 calls. Click a counter to open the XML.
  • (1) Request and response, two seconds apart. Open both.
  • (2) A second call for the same document. Compare its request with the billing request.
  • (3) A row with errors. Start here.

Open and save the XML

  1. Open the row. Click the log counter. The XML opens in a display window.
  2. Save it. Right-click, choose View Source, and save the file, or select all and copy it into a text file.
  3. Repeat for the other row of the pair. The request contains INDATA or a calculation request element; the response contains OUTDATA or a calculation response element.

What to look at first

A partial success with no tax on the line starts with a gap in the request A saved request and response pair, trimmed to the lines that matter (illustrative element names). The response reports success and partial success, and line 1 carries no tax block.
  • Request (INDATA): <INDATA> <INVOICE_DATE>2026-10-15</INVOICE_DATE> <LINE ID="1"> <PRODUCT_CODE>MAT-55021</PRODUCT_CODE> <SHIP_TO> <COUNTRY>US</COUNTRY> <STATE>CO</STATE> <CITY>Denver</CITY> <POSTCODE/> </SHIP_TO> </LINE> </INDATA>
  • Response (OUTDATA): <OUTDATA> <SUCCESS>true</SUCCESS> <PARTIAL_SUCCESS>true</PARTIAL_SUCCESS> <LINE ID="1"> <MESSAGE>Address incomplete</MESSAGE> <TOTAL_TAX>0.00</TOTAL_TAX> (no TAX block) </LINE> </OUTDATA>
  • (1) Request first: the ship-to has a region and no postal code.
  • (2) Both flags are true. The call did not fail, so nothing stopped the document.
  • (3) The line has no jurisdiction or tax block, so SAP has nothing to post as a tax line.

Then follow Diagnosing an unexpected tax result and, for the SAP side of the flow, How SAP calls an external tax engine.