Closing Purchase Order Using 4GL Code in Sage Enterprise Management (Formerly Sage X3 V11)

 Closing Purchase Order Using 4GL Code in Sage Enterprise Management (Formerly Sage X3 V11)

Posted by

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

 

Syntax:

 

    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)

                                     2:- GMESSAGE+GERROR

                                     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)

Example:

Created a purchase Order

Code for Closing the Purchase Order 

After execution of the Code, Purchase Order is closed as shown below.  

 

The following two tabs change content below.
Panni

Panni

Panni is an Alberta based technology consulting firm offering consulting services in Sage ERP X3, business intelligence, business collaboration, invoice automation to medium and large enterprises. Leveraging our deep industry knowledge and technical expertise, we help companies improve and optimize their business processes by creating technology-enabled business solutions.

Leave a Reply