Now accepting guest editorial from SAP, Oracle, Workday and ServiceNow practitioners.Pitch a guide
The Sign-Off Table

Lesson 6 of 6

Testing inventory postings

10 min

Listen to this lesson

0:00 / 7:54

Inventory tests have a big advantage: every movement leaves hard evidence. A material document, a journal entry, and a measurable change in stock. A good inventory test checks all three, before and after, and does not stop at "posted successfully."

The before-and-after method

  1. Record beforeStock of CMC-RTR-200 in 171S by stock type; inventory G/L balance
  2. Expected resultWrite what should change: quantity, stock type, value, accounts
  3. PostExecute the movement with a user holding the warehouse role
  4. Record afterMaterial document, journal entry, stock by stock type
  5. CompareAfter minus before equals expected; journal entry accounts and amounts match
A simple, repeatable method for every inventory test.
The Sign-Off Table · thesignofftable.com/academy/sap-mm-203

Contoso's inventory test set

TestMovementExpected evidence
Receipt for PO into unrestricted101Stock +500; inventory debit, GR/IR credit; PO history updated
Receipt into quality inspection, then release101 then 321Inspection +500 then -500, unrestricted +500; no value change on 321
Reversal of a wrong receipt102 via cancellationStock and GR/IR reversed; both documents linked
Refused reversal (stock already issued)102Error; no posting
Return to supplier122Stock -30; return delivery note; GR/IR adjusted
Storage location transfer, two-step313 then 315Stock in transfer then cleared; no value change
Plant-to-plant transfer301 (or stock transport order)1710 -100, 1720 +100; value difference posted
Issue to cost center201Stock -10; expense on the cost center
Scrapping551Stock -10; scrapping expense

Receipts, transfers and reversals in one test set.

Reconciling quantities and values

Individual tests prove individual movements. At the end of a test cycle, a reconciliation proves the whole: total stock value per valuation class from the stock reports should equal the inventory G/L account balance, and GR/IR should be explainable PO by PO. If they do not match, something posted value without quantity or the other way round, which is precisely the kind of defect that slips through movement-by-movement tests.

An illustrative inventory test cycle: individual movement tests first, then the cycle reconciliation that catches value-without-quantity defects.
The Sign-Off Table · thesignofftable.com/academy/sap-mm-203
Document only, singleWeak: proves something posted
Full, singleStrong: proves one movement is right
Document only, cycleWeak: counts postings
Full, cycleStrongest: stock and G/L reconcile across all tests
Aim for full evidence on each test and a reconciliation for the cycle.
The Sign-Off Table · thesignofftable.com/academy/sap-mm-203

What would you do?

All inventory tests passed individually, but at the end of the cycle the inventory G/L balance is $2,400 higher than the stock value report. What do you do?

Choose test data so that results are easy to read. Use quantities that are not already in stock (for example, receive 37 rather than 100), so the change is obvious in the stock report. Use a dedicated storage location for tests where possible, so other testers' postings do not disturb your before and after values. And record the posting date you used, because stock reports for a date and journal entries by period depend on it.

What goes wrong in inventory testing

Symptom in the test cycleUsual causeHow to prevent it
Before values change between "record before" and "post"Another tester or an MRP or backflush job posted to the same product and storage locationDedicated test products or storage locations; note job schedules in CMQ
Receipt refused on the 1st of the monthMM period not opened (MMPV) or FI period closed (OB52)Make period opening a test precondition with an owner
321 release does nothing in the stock reportStock was in QM inspection lot stock; the usage decision should post it, not a manual 321Agree which products are QM-managed before writing the test
Plant-to-plant value difference is not $600Standard price for 1720 not released, or moving average used in one plantCheck price control and price per plant in the accounting view first
Reconciliation gap at cycle endManual journal entries to the inventory account, or price changes during the cycleBlock direct postings to inventory accounts; freeze price changes during the cycle

Typical inventory test failures that are not defects in the movement itself.

Record the test cases, evidence and defects where the program keeps them: at Contoso that is test management in SAP Cloud ALM, with each test case linked to the requirement and the movement type it proves. For Public Edition, SAP's Test Automation Tool ships standard scripts for the common inventory processes that you can copy and adapt.

Inventory tests also need the right users and timing. Run receipts and issues with the warehouse clerk role and transfers with the role that will post them in production. Post some tests near a period boundary to check that posting periods are open and closed as intended: a receipt with a posting date in a closed period should be refused, and that refusal is evidence too. Finally, agree with Dan which inventory and GR/IR accounts will be reconciled after the cycle, so that the reconciliation is planned rather than improvised.

A receipt dated in a closed period should be refused by one of two separate period checks; the refusal message is the evidence.
The Sign-Off Table · thesignofftable.com/academy/sap-mm-203
Key points
  • Record stock and balances before, write expected results, post, record after, compare.
  • Test receipts, transfers, issues, reversals, returns and refused postings.
  • Evidence for every test: material document, journal entry and stock change.
  • Reconcile stock value to the inventory G/L account at the end of each cycle.
  • Protect before/after values from other testers and jobs; make period opening a precondition.

Check your understanding · not graded

Lesson check

  1. 1. What are the three pieces of evidence for an inventory posting?

  2. 2. Why record stock before posting?

  3. 3. Which reconciliation proves an inventory test cycle?

  4. 4. Which is a valid negative inventory test?