Closing Sales Order Lines Using 4GL Code in Sage Enterprise Management (Formerly Sage X3 V11)
If we want to close the sales order lines using 4GL code in SEM (Sage X3).
Following syntax is used to call the subprogram to close the Sales order lines.
Call DIVCLESOQ (WSOHNUM, WSOPLIN, WSOQSEQ, WCCLREN) from TRTVENCDE
WSOHNUM: It is a character variable which contains Sales order number
WSOPLIN : It is Integer value which indicates Sales order Line number
WSOQSEQ : It Contains an integer value. This indicates sequence number WCCLREN : It Contains an character value. Which is reason for Closing By calling above subprogram we can close the Sales order lines. (Note: There is always a transaction in Progress when we use this sub-program)
Create a sales order before execution of the code
Closed Sales order is shown below.
After Execution of code the order line will be closed based on the criteria as shown in below.If all lines get closed then Sales order will be closed automatically which is being handled by standard process.