Entry points >  Module Sales >  Standard script TRTVENLIV  

Display all Hide all

MAJCDESDD: Load [F] SDELIVERYD in an order delivery

This entry point is used to take back control at the end of the delivery detail [F] class loading and thus just before writing the corresponding record in order to enter fields in this record.

It is called in the update processing for a TRTVENLIV delivery.

Context and operating mode

Transaction

There is one transaction in progress

Log file

There is an open log file.

Different call cases

This entry point is called from the next delivery creation processings:

·               Automatic delivery function

Open tables

In the table below, the significant content flag indicates that the content is in phase with the context (the current customer is loaded…). It is usually the case for the file that contains the header and not the file that contain the lines…

Table

Significant content

Table Title

SDELIVERY

No

(in process of loading)

Delivery header

SDELIVERYD

No

(in process of loading)

Delivery line

SORDER

Yes

Order headers

SORDERQ

Yes

Order line quantities

SORDERP

Yes

(if [F:SOH]SOHCAT<>4)

Order line prices

SORDERC

Yes

(if F:SOH]SOHCAT=4)

Product / customer orders (contract orders)

BPARTNER

Yes (BP invoice)

BP

BPCUSTOMER

Yes (Bill to customer )

Customers

BPDLVCUST

Yes

Ship-to customers

BPCUSTMVT

No

Customer transactions

SALESREP

No

Sales reps

BPCARRIER

Yes

Carriers

ITMMASTER

Yes

Products

ITMSALES

Yes

Products - Sales

ITMBPC

Yes

(if the product-customer exists)

Products - Customers

ITMFACILIT

No

Products - Sites

TABMODELIV

Yes

Delivery methods

FACILITY

No

Sites

 

ALI_NEGSTO: To force the generation of the shortage

This entry point is used during the processing of an order line in automatic delivery.

It is used to force the generation of a shortage when the allocated quantity in the order cannot be delivered.

Context and operating mode

Transaction

There is one transaction in progress.

Log file

There is an open log file.

Call context

It is called in automatic delivery for each processing of an order line.

It is located in the ALICDESDD label of the TRTVENLIV processing after reading the order line and the determination of the quantity to be delivered.   

It is used (if negative stock is authorized) to force the generation of a shortage quantity corresponding to the difference between the quantity to be delivered and the actual quantity that can be delivered.

Available variables and masks

[F :ITM]NEGSTO      : Negative stock authorized (1=no/2=yes)

GSHTDLV                 : Delivery of quantities with shortages (1=no/2=yes).

For instance: 

The quantity allocated in detail on the order line that can only be partially delivered, maybe not at all (physical stock count in process, analysis request, prohibited status, expired lot or non identified stock waiting put-away).

 The quantity allocated in global on the order line can only be partially delivered, maybe not at all (if there is no (or insufficient) stock that respects the issue rules for the delivery).

In this case, to force the generation of a shortage for this non shippable quantity, it is necessary to act on the WRUP value.

[L]WRUP = 1

Warning, this modification may cause shortages (stock physically not present or that cannot be delivered), and then pending movements that cannot be adjusted. 

Open tables

In the table below, the significant content flag indicates that the content is in phase with the context (the current customer is loaded…). It is usually the case for the file that contains the header and not the file that contain the lines…

Table

Significant content

Table Title

SORDER

Yes

Order headers

SORDERQ

Yes

Order line quantities

SORDERP

Yes if [F :SOH]SOHCAT<>4

Order line prices

SORDERC

Yes if [F :SOH]SOHCAT=4

Product line orders

ITMMASTER

Yes

Products

ITMSALES 

Yes 

Sales product

 

CALPORT: Specific/custom freight calculation

This entry point is involved in the carrier management.

It is used to make a specific/custom freight calculation. It replaces the standard calculation carried out by the search through the carrier price lists.

This entry point is located in the TRTVENLIV processing.

It is called from the processing that are used in the generation of a delivery: Delivery button in the orders, automatic invoicing of deliveries.

Context and operating mode

Transaction

There is a transaction in process (delivery creation transaction). The GOK variable is used and tested. It equals 1. It can be set to 0 if the transaction should be canceled. 

Log file

There is no open log file.

Different call cases - Available variables and masks

The entry point is called from:

·               The delivery button in the orders management

·               The automatic delivery function.

It is called during the delivery creation transaction. All the detail lines are created with the associated updates. It is located just before the update of the customer movements and the writing of the delivery header record.

The entry point is called at the time of the search for the carrier price list.

The following variables are used:

·               WDACDLV (local integer) is loaded with the freight invoicing element no. given by the FRENUM setup.

·               WCRY (local char)

WCTY (local char)

WPOSCOD (local char)    :

If nothing has been entered in the delivery address window, these variables are loaded with the country code, the town and the postcode of the ship-to customer (by reading the ship-to customer address in the addresses table) if not they are loaded with the codes entered in the delivery address window.

·               WPOINT_ENTREE (local integer)    :

It is initialized to 0. If set to 1, it will prevent the standard carrier price search.

·               LAMTFRE (local decimal)     :

Calculated freight amount.

·              STAT (local integer)   :

Return status. Set to 0, it is used to load the calculated freight amount in the invoicing element grid of the delivery and its display.

The carrier price search is carried out if the FRENUM setup corresponding to the freight invoicing element no. is not equal to 0 and if the reading of this invoicing element in the elements table has taken place (WDACDLV is loaded).

It is here that the CALPORT entry point is called.

Next the search of the standard carrier prices is carried out if WPOINT_ENTREE equals 0.

Then the calculated freight amount loading in the invoicing elements grid and the display is carried out if STAT = 0.

The CALPORT entry point must therefore:

.        Set WPOINT_ENTREE to 1.

.        Set LAMTFRE with calculated freight amount.

.        Set STAT to 0 for the selection of this amount to be carried out. 

Open tables

In the table below, the significant content flag indicates that the content is in phase with the context (the current customer is loaded…). It is usually the case for the file that contains the header and not the file that contain the lines…

For the tables that are not used in all processings, the names of the processings that use them are given. 

Table

Significant content

Table Title

SDELIVERY

No

Delivery header

SDELIVERYD

No

Delivery line

SORDER

No

Order headers

SORDERQ

No

Order line quantities

SORDERP

No

Order line prices

SORDERC

No

Product / customer orders (contract orders)

BPARTNER

Yes (BP invoice)

BP

BPCUSTOMER

Yes (Bill to customer )

Customers

BPDLVCUST

No

Ship-to customers

BPCUSTMVT

No

Customer transactions

SALESREP

No

Sales reps

BPCARRIER

Yes

Carriers

ITMMASTER

No

Products

ITMSALES

No

Products - Sales

ITMBPC

No

Products - Customers

ITMFACILIT

No

Products - Sites

TABMODELIV

Yes

Delivery methods

FACILITY

No

Sites

SFOOTINV

Yes

Invoicing elements

TABSOHTYP

No (SUBSOH)

Order type table

TABCUR

No (SUBSOH)

Currency table

ITMMVT

No (SUBSOH)

Product - Movements

SPRICLINK

No (SUBSOH)

Search sales prices (link)

PRICSTRUCT

No (SUBSOH)

Price list structure

CONTACT

No (SUBSOH)

Contact

ATEXTE

No (SUBSOH)

Dictionary messages

SQUOTED

No (SUBSOH)

Quote detail

 

RECHNUMSEQ: Calculate order sequence number

This entry point involves the management of the contract order deliveries (can be inter-site).

During the partial delivery of a delivery request, it is used to intervene on the calculated sequence number for the new delivery request.

This is used in the case of repetitive partial deliveries, in order to not be blocked after 9 deliveries for a single delivery request. The standard function assigns in effect the sequence numbers by dichotomy (in order to make line insertions impossible).  

This entry point is located in the TRTVENLIV processing.

Context and operating mode

Transaction

There is a transaction in process (delivery creation transaction). The GOK variable is used and tested. It equals 1. It can be set to 0 if the transaction should be canceled. 

Log file

There is no open log file.

Different call cases - Available variables and masks

The entry point is called during each partial delivery for a delivery request.

[F :SOQ]SOQSEQ contains the sequence number for the delivery request that has been delivered.

[F :SOQ1]SOQSEQ contains the sequence number for the next delivery request. Its value is blank if this delivery request does not exist.

The WSEQ variable contains the sequence number assigned for the creation of the new delivery request.

So as to intervene in the sequence number for the new delivery request, it is therefore necessary to modify the value of this variable WSEQ

Open tables

In the table below, the significant content flag indicates that the content is in phase with the context (the current customer is loaded…). It is usually the case for the file that contains the header and not the file that contain the lines…

For the tables that are not used in all processings, the names of the processings that use them are given. 

Table

Significant content

Table Title

SORDERQ

Yes

Order line quantities

 

CPYSLSTXT: Load the texts in the SDELIVERY file

This entry point is used to take control when loading the delivery header [F:SDH] class from the first order to be delivered and right after loading the header and footer texts associated with this delivery.

It is as a consequence possible:

- to intervene in the texts associated with this delivery.

- to intervene on the fields in the delivery header, whether they are standard or specific.

It is called when delivering an order or delivery request from the orders delivery function.

Context and operating mode

Transaction

There is one transaction in progress

Log file

There is an open log file

Call context

It is called when delivering an order or delivery request using the automatic orders delivery function.

It is located in the ALICDESDH sub-program of the TRTVENLIV processing.

It is used to intervene on the texts related to this delivery, to load the specific delivery header fields in the [F:SDH]SDELIVERY table or to modify standard fields.

Open tables

In the table below, the significant content flag indicates that the content is in phase with the context (the current customer is loaded…). It is usually the case for the file that contains the header and not the file that contain the lines…

Table

Significant content

Table Title

SDELIVERY

Yes

(in process of loading)

Delivery header

SDELIVERYD

No

(in process of loading)

Delivery line

SORDER

Yes

Order headers

SORDERQ

Yes

Order line quantities

SORDERP

Yes

(if [F:SOH]SOHCAT<>4)

Order line prices

SORDERC

Yes

(if F:SOH]SOHCAT=4)

Product / customer orders (contract orders)

BPARTNER

Yes (BP invoice)

BP

BPCUSTOMER

Yes (order customer )

Customers

BPDLVCUST

Yes

Ship-to customers

BPCUSTMVT

No

Customer transactions

SALESREP

No

Sales reps

BPCARRIER

Yes

Carriers

ITMMASTER

Yes

Products

ITMBPC

No

Products-customer

TABMODELIV

Yes

Delivery methods

FACILITY

No

Sites

SVCRFOOT

No

 Sales document - Footer item

SVCRVAT

No

 Sales document - Taxes

LASTCUSMVT

No

 Last customer movements

ITMSALES

No

 Sales product

ITMFACILIT

No

 Product-site 

SWRKDLV

Yes

 W file Automatic deliveries

CPTANALIN

No

 Accounting analytical lines

ACTIV

No

 Activity codes

BPADDRESS

No

 Addresses

WAREHOUSE

No

 Warehouses

ITMWRH

No 

 Product - Warehouses

GACM

No

 Account core model

TABSDHTYP

Yes

 Deliveries types table

 

ALISOQ1: Load [F] SORDERQ in modification of a delivery request

This entry point involves the management of the contract order deliveries (can be inter-site).

The modification of a delivery request causes the original line to be closed and a new line to be created.

The entry point is used to populate specific/custom fields for this new line.   

This entry point is located in the TRTVENLIV processing.

Context and operating mode

Transaction

There is a transaction in process (delivery creation transaction). The GOK variable is used and tested. It equals 1. It can be set to 0 if the transaction should be canceled.

Log file

There is no open log file.

Different call cases - Available variables and masks

The entry point is called before writing the [F:SOQ1] class of the new line.

Open tables

In the table below, the significant content flag indicates that the content is in phase with the context (the current customer is loaded…). It is usually the case for the file that contains the header and not the file that contain the lines…

For the tables that are not used in all processings, the names of the processings that use them are given.

 Table

Significant content

Table Title

SORDERQ1

Yes

Order line quantities

 

ALISOQSDH: Load delivery detail fields in order delivery

This entry point is used to take control at the end of the delivery detail screen loading from an order detail record upon order delivery creation.

It is hence used to load fields that are specific to screen SDH1 or to modify standard fields.

It is called for each line in an order picking from the delivery management and for each line upon order delivery via button delivery in the order management.

Context and operating mode

Transaction

There is no transaction in progress if in order picking mode from the delivery management. There is a transaction in progress if the delivery button is used from the order management.

Log file

There is no log file.

Call context

It is called for each line in an order picking from the delivery management and for each line upon order delivery via button delivery in the order management.

It is located at the end of sub-program ALISOQSDH of processing TRTVENLIV.

It is used to load fields that are specific to screen SDH1 (and to table SDELIVERYD, too) or to modify standard fields from this screen in this table.

Available variables and masks

The delivery object screens are opened and loaded with the delivery being created.

Variable NOL contains the number of the line being created in the [M:SDH1] line grid. All the fields of the line are loaded.

Open tables

In the table below, the significant content flag indicates that the content is in phase with the context (the current customer is loaded…). It is usually the case for the file that contains the header and not the file that contain the lines…

Table

Significant content

Table Title

SORDER

Yes

Order headers

SORDERQ

Yes

Order line quantities

SORDERP

Yes if [F :SOH]SOHCAT<>4

Order line prices

SORDERC

Yes if [F :SOH]SOHCAT=4

Product line orders

ITMMASTER

Yes

Products

ITMSALES 

Yes 

Sales product

 

ALICDESDD: Load [F]SDD in order delivery before the price list/tax calculation

This entry point is used to take back control at the end of the delivery detail [F] class loading and thus just before writing the corresponding record in order to enter fields in this record.

However, conversely to entry point MAJCDESDD, this entry point is located before the price list/tax calculation.

It is called in the update processing for a TRTVENLIV delivery.

Context and operating mode

Transaction

There is one transaction in progress

Log file

There is an open log file.

Different call cases

This entry point is called from the next delivery creation processings:

·               Automatic delivery function

It is located before the price list and tax calculation, and so before entry point MAJCDESDD.

Open tables

In the table below, the significant content flag indicates that the content is in phase with the context (the current customer is loaded…). It is usually the case for the file that contains the header and not the file that contain the lines…

Table

Significant content

Table Title

SDELIVERY

No

(in process of loading)

Delivery header

SDELIVERYD

No

(in process of loading)

Delivery line

SORDER

Yes

Order headers

SORDERQ

Yes

Order line quantities

SORDERP

Yes

(if [F:SOH]SOHCAT<>4)

Order line prices

SORDERC

Yes

(if F:SOH]SOHCAT=4)

Product / customer orders (contract orders)

BPARTNER

Yes (BP invoice)

BP

BPCUSTOMER

Yes (Bill to customer )

Customers

BPDLVCUST

Yes

Ship-to customers

BPCUSTMVT

No

Customer transactions

SALESREP

No

Sales reps

BPCARRIER

Yes

Carriers

ITMMASTER

Yes

Products

ITMSALES

Yes

Products - Sales

ITMBPC

Yes

(if the product-customer exists)

Products - Customers

ITMFACILIT

No

Products - Sites

TABMODELIV

Yes

Delivery methods

FACILITY

No

Sites

 

BEFREWSDH: Before writing delivery header

This entry point is called before the "Rewrite" instruction for each delivery header.

The SDELIVERY [SDH] table buffer is loaded and can be modified with the usual care.

Context and operating method

Transaction

There is one transaction in progress.

Log file

There can be an open log file (GTRACE test)

Call context

Call before writing a record in the SDELIVERY table.

Available variables and masks

The SDELIVERY file is open and loaded.

Table

Significant content

Table Title

SDELIVERY

Yes

Delivery header

 

BEFREWSDD: Before writing the delivery detail line

This entry point is called before the "Rewrite" instruction for each delivery detail line.

The SDELIVERYD [SDD] table buffer is loaded and can be modified with the usual care.

Context and operating method

Transaction

There is one transaction in progress.

Log file

There can be an open log file (GTRACE test)

Call context

Call before writing a record in the SDELIVERYD table.

Available variables and masks

The SDELIVERYD file is open and loaded.

Table

Significant content

Table Title

SDELIVERYD

Yes

Deliveries - Detail

 

ALISOHSDH: Load delivery header fields in order delivery

This entry point is used to take control once the delivery header screens have been loaded when creating an order delivery or delivery request.

It is thus used to load fields that are specific to screens SDH0, SDH1, SDH2 and SDH3 or to modify standard fields.

It is called when selecting an order in the orders picking, when selecting a delivery request in the open orders picking from the deliveries management and finally, when delivering an order using the delivery button from the orders management.

Context and operating method

Transaction

There is no transaction in progress when picking an order or delivery request from the deliveries management. There is a transaction in progress if the delivery button is used from the order management.

Log file

There is no log file.

Call context

It is called when selecting an order in the orders picking, when selecting a delivery request in the open orders picking from the deliveries management and finally, when delivering an order using the delivery button from the orders management.

It is located at the end of sub-program ALISOHSDH of processing TRTVENLIV.

It is used to load fields that are specific to the screens SDH0, SDH1, SDH2 and SDH3 (and so table SDELIVERY) or to modify standard fields from this screen in this table.

Available variables and masks

The screens of the delivery object are open. The header fields of screens SDH0, SDH1, SDH2 and SDH3 are loaded with the data of the order or delivery request in delivery progress.

The address screens ADB2 and ADB3 are loaded with the delivery address and the billing address.

When delivering a delivery request, [F:SOH] is loaded with the contract. [F:SOC] is loaded with the product line. [F:SOQ] is loaded with the delivery request line. If there are price lines, [F:SOP] is loaded with the first one.

When delivering an order, [F:SOH] is loaded with the header. [F:SOQ] and [F:SOP] are loaded with the picked line or with the first order line in the case of a button.

Open tables

In the table below, the significant content flag indicates that the content is in phase with the context (the current customer is loaded…). It is usually the case for the file that contains the header and not the file that contain the lines…

Table

Significant content

Table Title

SORDER

Yes

Order headers

SORDERQ

Yes

Order line quantities

SORDERP

Yes if [F :SOH]SOHCAT<>4

Order line prices

SORDERC

Yes if [F :SOH]SOHCAT=4

Product line orders

BPDLVCUST

Yes

Ship-to customer

BPCUSTOMER

Yes 

Sold-to customer

 

ALICDESDH: Load [F:SDH] in order delivery

This entry point is used to take control once the delivery header [F:SDH] class has been loaded upon automatic order delivery.

It is thus used to load specific fields or to modify standard fields.

It is called when delivering an order or delivery request from the orders delivery function.


Context and operating method

Transaction

There is one transaction in progress

Log file

There is an open log file.

Call context

It is called when delivering an order or delivery request using the automatic orders delivery function.

It is located at the end of sub-program ALICDESDH of processing TRTVENLIV.

It is used to load specific delivery header fields in the [F:SDH]SDELIVERY table or to modify standard fields.

Open tables

In the table below, the significant content flag indicates that the content is in phase with the context (the current customer is loaded…). It is usually the case for the file that contains the header and not the file that contain the lines…

Table

Significant content

Table Title

SDELIVERY

Yes

(in process of loading)

Delivery header

SDELIVERYD

No

(in process of loading)

Delivery line

SORDER

Yes

Order headers

SORDERQ

Yes

Order line quantities

SORDERP

Yes

(if [F:SOH]SOHCAT<>4)

Order line prices

SORDERC

Yes

(if F:SOH]SOHCAT=4)

Product / customer orders (contract orders)

BPARTNER

Yes (BP invoice)

BP

BPCUSTOMER

Yes (order customer )

Customers

BPDLVCUST

Yes

Ship-to customers

BPCUSTMVT

No

Customer transactions

SALESREP

No

Sales reps

BPCARRIER

Yes

Carriers

ITMMASTER

Yes

Products

ITMFACILIT

No

Products - Sites

TABMODELIV

Yes

Delivery methods

FACILITY

No

Sites

SVCRFOOT

No

 Sales document - Footer item

SVCRVAT

No

 Sales document - Taxes

LASTCUSMVT

No

 Last customer movements

ITMSALES

No

 Sales product

ITMFACILIT

No

 Product-site 

SWRKDLV

Yes

 W file Automatic deliveries

CPTANALIN

No

 Accounting analytical lines

ACTIV

No

 Activity codes

BPADDRESS

No

 Addresses

WAREHOUSE

No

 Warehouses

ITMWRH

No 

 Product - Warehouses

GACM

No

 Account core model

TABSDHTYP

Yes

 Deliveries types table