How to Close the Sales Order Lines through Code in Sage X3 (Sage Enterprise Management)

closing the sales order lines using 4GL code in Sage X3

In this blog, we are going to learn about the closing sales order lines using 4GL code. By using this calling function in Sage X3 ERP system developers can perform their customization whenever required. Follow these below steps, to close the sales order lines:

Step 1: Navigate to All -> Sales -> Orders

In the above screenshot, we notice that one of the lines in the sales order is in “Pending” state, which we can close by using the calling function.

 Step 2: Syntax for closing of sales order lines through 4GL code:



  • WSOHNUM : Sales Order number
  • WSOPLIN : Sales Order line number
  • WSOQSEQ : Sales order sequence number
  • WCCLREN : Close reason

The above calling function is used to close the sales order lines level.

Thus, the sales order line is ‘Closed’ based on that calling function as displayed above screenshot.

About Us-

GerminIT – Recognised for its X3 implementation and customisation world over, GerminIT is one of the oldest Sage X3 (a Sage Business Cloud Solution) development and implementation enabler and a one-stop solution provider for Sage X3 organizational needs. With a proven track record of X3 development and implementation solutions for clients across the US, UK, Middle East, Australia, Asia, and Africa, we bring complete end-to-end assistance for data migration, system integrations, technical consultations, implementation competence, third-party add-on development, and product customizations.

With GerminIT your business will be supported with the best-in-class Sage X3 customization and development services, integrated applications such as Shipping System | eCommerce | Business Intelligence | POS | WMS | Payment Gateway, and mobile add-ons solutions. GerminIT caters to a wide range of Sage X3 offerings. Currently, we provide end-to-end support with Sage X3 implementation and customization solutions for Sage business partners, Sage PSG, and end-users worldwide.

To know more about our Sage X3 Integration and Services offerings please contact us at We will be glad to hear from you.


Cloud ERP Consultation In India