Skip to main content
Question

Error : Code part Dept must have a value for [Line No] in Purchase Order [PO No]

  • Nov 16, 2026 10:35 PM UTC
  • 1 reply
  • 23 views

Forum|alt.badge.img

I saw someone else had this issue 4 years ago. The answer was that pre-posting was enabled. I have the same error, and I clicked the pre-posting button. The system said pre-posting was NOT enabled. What now?

1 reply

richardwoods
Do Gooder (Partner)
Forum|alt.badge.img+6
  • Do Gooder (Partner)
  • Nov 25, 2026 5:05 PM UTC

Short answer: that error normally means the Dept code part has been made mandatory for purchase order lines, so each line needs a Dept value entered through pre-posting before it will go through. The message that pre-posting is not enabled is a separate point: the pre-posting for order lines has to be allowed in Posting Control for your company, and if it is not, there is nowhere to enter the value. So the likely fix is to set that up properly, or to give Dept a default so nobody has to type it.

Why the two messages can both be true

Mandatory pre-posting is a way of forcing a manually entered code part value, and it can be used on purchase order rows (and requisitions, customer orders and manual inventory transactions). If Dept is mandatory for the PO line function and the line has no pre-posting for Dept, you get a "must have a value" style error. If the pre-posting itself is not allowed for the company, the pre-posting button tells you so and the line stays stuck.

A setup along these lines

  • Open Posting Control (Accounting Rules) for the company that owns the purchase order.
  • Add the posting type M102 - Pre-accounting purchase order line and pick a control type from the list of values. This is what allows pre-posting on PO lines. If you also want it at header level, the equivalent is M101.
  • Decide where the Dept value comes from. Either the buyer enters it on the line, or you set a default code part value (used only when nothing is entered) or a fixed default value if lines should always go to the same department.
  • Save, then on the purchase order line use Pre-posting, enter the Dept value and save. For example, a line for the maintenance team would carry Dept MAINT, using whatever your own code part values are.

The awkward case

Pre-posting entered on the order header applies to lines added afterwards. If the header and lines already exist, the value has to be entered on each line. That catches people out when a PO was created before the setup was changed.

Things to know

  • The header and at least one line must be saved before pre-posting can be entered.
  • The code string and code part values (including the Dept values) need to exist for the company first.
  • If Dept is not meant to be mandatory for purchasing at all, the change belongs in the code part requirement for that posting type rather than in the order, so check who set it up before changing it.

Worth a look: the IFS Cloud documentation topics Enter Pre-Posting Purchase Order Line and Posting Control, and the section on mandatory pre-posting and control types.

Which company is the PO in, and does Posting Control for that company have an M102 row at all? It would also help to know whether Dept is meant to be mandatory for every purchase order line, or only some of them.

Created with the help of Ask Olive.