CUSCTLSOH: Enabling modification of a signed intersite purchase order

This entry point located in the SUBPOHA processing (purchase order management), is used to ignore the return code of the CTLMAJSOH sales processing of TRTVENISOC. This processing controls that the sales order can be properly deleted. If it cannot be deleted, the processing displays an error message and an error code. 

The aim of this entry point is to reset to zero the return code to enable the modification of the purchase order.

Context and operating mode

Transaction

There is no transaction in progress.

Log file

There is no open log file.

Different call cases

The call is performed in purchase order management when trying to modify a line of a manually or automatically signed intersite purchase order ([F:POH]APPFLG = 2,3 or 5).

It is performed as a return to the call to CTLMAJSOH processing from TRTVENISOC which controls the possibility to delete a sales order.

Available variables and masks

The following variables are loaded during the call.

GBIDI3: Error number sent by the sales order control processing.

GBIDI3 = 16: sales order allocated, delivered, invoiced or with at least one line prepared.

GBIDI3 = 17: order associated to a proforma.

GBIDI3 = 18: At least one prepayment has been deposited.

GBIDI3 = 19: At least one line associated to a back-to-back order.

GMESSAGE : Contains the message associated to the value of GBIDI3.

GBIDI3 must be reset to zero and GMESSAGE must be emptied, in order not to be stuck on the same errors.

Open tables

In the table below, the significant content flag indicates that the content is in phase with the context.

Table

Significant content

Table Title

PORDER

        OUI

Purchase order header

SORDER

        OUI

Sales order header

 

CUSUPDSOH: Specific update of an Intersite sales order

This entry point located in the SUBPOHA purchase order management processing, allows to prevent the deletion of the associated sales order upon modification of a signed Intersite purchase order. 

The updates on the sales order must be made in the specific processing associated.

Context and operating mode

Transaction

There is one transaction in progress. Set GOK=0 in case of problem with database update.

Log file

There can be an open log file.

Different call cases

The call is performed in purchase order management during the database update upon modification of a signed purchase order.

It is made before the call to GENSOH processing from TRTVENISOC, performed in deletion mode: Call GENSOH("A",1,GBIDI3) from TRTVENISOC

Available variables and masks

The following variables are loaded during the call.

GPE:  Work variable set to 1 before the call to the entry point.

This variable should be set to 0 in order not to execute the standard processing of purchase order deletion.

Note that the specific processing will perform the updates needed on the sales order.

To this end, use GENSOH processing from TRTVENISOC in modification mode:

Call GENSOH("M",1,GBIDI3) from TRTVENISOC

Screens [M:POH0], [M:POH1], [M:POH2] and [M:POH3] are loaded and in phase with the context.

Open tables

In the table below, the significant content flag indicates that the content is in phase with the context.

Table

Significant content

Table Title

PORDER

        OUI

Purchase order header

SORDER

       

Sales order header