MODCPTLIV: Additional updates during the validation of a shipment

This entry point concerns the validation of sales deliveries.

It is notably used to assign a new sequence number counter for shipments or to carryout additional updates.

This entry point is called in the TRTVENLIVV process. It is called from each processing used to validate a delivery.

Context and operating mode

Transaction

There is one transaction in progress. The GOK variable is set to 1.

Log file

There is an open log file when the entry point is called from the delivery automatic validation function or from the automatic delivery function with the validation option set to yes.

There is no open log file when the entry point is called from the validation button in the shipment function.

Different call cases

This entry point is called from each processing that is used to validate a delivery:

. Validation button in the delivery function

. Delivery validation function

. Automatic delivery function

The context is as follows:

. The delivery currently being processed is ready to be validated. All the controls have been carried out.

. In the validation transaction for the delivery. GOK is set to 1.

. The delivery has been read and locked.

. No update has been performed yet.

This entry point is used in the context of a packing slip renumbering for:

. The search for a new sequence number for the delivery.

. The re-write with the new sequence number counter for the records of the STOSER file linked to the delivery.

. The re-write with the new sequence number counter for the records of the STOALL file linked to the delivery.

. The re-write with the new sequence number counter for the records of the SDELIVERYD file linked to the delivery.

. The re-write with the new sequence number counter for the delivery header.

Open tables

In the table shown below, the Significant content flag indicates that the contents matches the context (the current shipment is loaded … but the lines).

Table

Significant content

Table title

SDELIVERY

Yes

Delivery header

SDELIVERYD

No

Shipment detail

ITMMASTER

No

Product

ITMFACILIT

No

Product-site

STOALL

No

Allocations

STOLOT

No

Lot numbers

STOCK

No

Stock

STOSER

No

Serial numbers

SORDERQ

No Sales orders - Quantities (order detail)

BPCUSTMVT

No

Customer transactions

BPDLVCUST

No

Ship-to customer

BPARTNER

No

BP

CFMDLVMAJ: Update of the specific/custom files after validation

Use this entry point to take over before the end of the validation transaction for a delivery in order to update the specific/custom files.

It is called from the TRTVENLIVV script for the validation of deliveries.

Context and operating mode

Transaction

There is one transaction in progress

To refuse the confirmation of the shipment, it is necessary to set the GOK variable to 0.

Log file

There is an open log file when the entry point is called from the delivery automatic validation function or from the automatic delivery function if the validation option is set to yes.

There is an open log file when the entry point is called from the validation button of the shipment function. It is used to mention the errors that could prevent the shipment validation. As a consequence, the log file is only displayed if the validation could not take place.

Different call cases

This entry point is called from each script that is used for the validation of a delivery:

·               Validation button for the delivery function

·               Delivery validation function

·               Automatic delivery function

Open tables

In the table below, the Significant content flag indicates that the content matches the context (the current customer is loaded…). It is usually the case for the file containing the header, but not for the file containing the lines…

Table

Significant content

Table title

SDELIVERY

Yes

Delivery header

SDELIVERYD

No

Delivery line

ITMMASTER

No

Products

ITMSALES

No

Products - Sales

ITMFACILIT

No

Products - Sites

STOALL

No

Allocations

STOCK

No

Stock

STOLOT

No

Lots

STOSER

No

Serial number

STOTRS

Yes

Stock transactions

SORDERQ

No

Order lines

BPCUSTMVT

No

Customer transactions

BPDLVCUST

No

Ship-to customers

BPARTNER

No

BP

CFMSTKMAJ: Update of the stocks upon validation of a delivery

Use this entry point to take control of the validation transaction of a delivery during the update of the stocks in order to perform a specific update or to short-circuit the standard update.

It is called from the TRTVENLIVV script for the validation of deliveries.

Context and operating mode

Transaction

There is one transaction in progress

To refuse the confirmation of the shipment, it is necessary to set the GOK variable to 0.

Log file

There is an open log file when the entry point is called from the delivery automatic validation function or from the automatic delivery function if the validation option is set to yes.

There is an open log file when the entry point is called from the validation button of the shipment function. It is used to mention the errors that could prevent the shipment validation. As a consequence, the log file is only displayed if the validation could not take place.

Call context

This entry point is called from each script that is used for the validation of a delivery:

·               Validation button for the delivery function

·               Delivery validation function

·               Automatic delivery function

The context is as follows:

. In the validation transaction for the delivery. GOK is set to 1. The delivery has been read and locked. The [F:SDH] buffer is loaded. In the processing loop for the detail lines.

. For the detail line currently being processed, the detail line of the order is updated (if it is an order delivery), the WIP is deleted, the detail line of the delivery is updated. The [F:SDD] buffer is loaded. The STOWORK work screen used by the interface for stock update is loaded.

This entry point is found just before the call to the MAJ_STOCK subprogram of STKMAT that performs the update of the stocks. The subprogram is executed if GPE=0. This entry point can therefore be used to set GPE to 1 in order not to execute MAJ_STOCK and/or perform a specific update.

Open tables

In the table below, the Significant content flag indicates that the content matches the context (the current customer is loaded…). It is usually the case for the file containing the header, but not for the file containing the lines…

Table

Significant content

Table title

SDELIVERY

Yes

Delivery header

SDELIVERYD

Yes

Delivery line

ITMMASTER

No

Products

ITMSALES

No

Products - Sales

ITMFACILIT

No

Products - Sites

STOALL

No

Allocations

STOCK

No

Stock

STOLOT

No

Lots

STOSER

No

Serial number

STOJOU

No

Stock journal

SORDER

Yes

Order header

SORDERQ

Yes

Orders lines

STOREO

No

Reorder management

BPCUSTMVT

No

Customer transactions

LASTCUSMVT

No

Last customer transactions

BPDLVCUST

No

Ship-to customers

BPARTNER

No

BP

TABSTORUL

No

Stock management rules

SPACK

No

Package delivery

SPACKD

No

Delivery package details

STOPREH

No

Pick ticket header

STOPRELIS

No

Picking list shipping

CPTANALIN

No

Accounting analytical lines

SVCRFOOT

No

Sales documents: Footer item

SVCRVAT

No

Sales documents: Taxes

AUTCOMAT: Exclude the automatic sending of a sales delivery

Use this entry point in the process script TRTVENLIVV to exclude the automatic communication of a sales delivery as a transport document to the Portuguese fiscal authority.

Context and operating mode

The SDELIVERY table is open with the SDH abbreviation and positioned on the record to export. To avoid the automatic sending of a given document, assign the value 1 to the local variable AUTCOM.

AFTSDHVAL: Additional business logic after validation of a shipment

This entry point is used to insert additional logic after the end of the validation transaction for a shipment.
It is called from the shipment validation script, TRTVENLIVV.

Context and operating mode

Transaction

There is no transaction in progress.

Log file

There is an open log file when the entry point is called from an automatic shipment validation function or from the automatic shipment function if the validation option is set to Yes.

There is an open log file when the entry point is called from the validation button of the delivery function. It is used to mention the errors that could prevent the shipment validation. As a consequence, the log file is only displayed if the validation could not take place.

Different call cases

This entry point is called from each script that is used for the validation of a delivery:

  • Validation button for the shipment function
  • Shipment validation function
  • Automatic delivery function