Purchase order can be manually closed by using the close button in Purchase order, but in some scenarios, it is not possible to close the purchase order manually. Under such circumstances, we need to call a subprogram from standard.
Following syntax is used to close the Purchase order
Call TRTPOHCLE (WPOHNUM, WMSGFLG, WRET) From TRTACHDIV1
WPOHNUM: Purchase order number
WMSGFLG: It is Integer value which indicates error message
0:- No error Message
1:- error on screen (Call ERROR)
3:-Message in trace
WRET: (Return Code) It Contains an integer value.
By calling above subprogram we can close the Purchase order. (Note: There is always a transaction in Progress when we use this sub-program)
Created a purchase Order
Code for Closing the Purchase Order
After execution of the Code, Purchase Order is closed as shown below.
Latest posts by Panni (see all)
- How to Check Numberof Records in the Table in Sage Enterprise Management (Formerly Sage X3) - December 12, 2018
- How to fix Unauthorised Journal on Invoice type Error in Sage Enterprise Management (Formerly X3) - October 31, 2018
- How to Change Length of Data Type in Sage Enterprise Management (Formerly Sage X3) - October 17, 2018