SUBSDHB processing: Shipment management

SDHFROMPRH: Sales site on delivery created by the button from pick tickets

When creating a delivery via the button in pick tickets, the site used to determine the company is the shipment site of the pick ticket.

This entry point is used to act on this functioning, and choose another site, therefore another company possibly.

This is not the standard case.

The specific will need to potentially support the linked impacts.

Context and operating mode

Transaction

There is no transaction in progress.

Log file

There is no open log file.

Call context

This entry point is called when creating a delivery via the button in pick tickets.

At first, the GFCY global variable is initialized from the shipment site of the pick ticket ([F:PRH]STOFCY).

GFCY is then used to initialize other global variables such as GSOCIETE.

Available variables and masks

The ISDHFROMPRH whole local variable is declared and initialized to zero (zero).

If its value remains 0, the standard behavior is kept and GFCY is loaded with [F:PRH]STOFCY.

For any other value given to ISDHFROMPRH, it is considered that the value of GFCY was given in the entry point. This value will thus be kept.

The record of the pick ticket header is loaded in [F:PRH].

Example of modification of the GFCY value by the entry point:
GFCY = <Site to use>
ISDHFROMPRH = 1

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 but not for the file that contain the lines…

Table

Significant content

Table title

SDELIVERY

No

Delivery header

SDELIVERYD

No

Deliveries - Detail

SORDER

No

Order headers

SORDERQ

No

Order line quantities

SORDERP

No

Order line prices

SORDERC

No

Product line orders

BPARTNER

No

BP

BPCUSTOMER

No

Customers

BPDLVCUST

No

Ship-to customers

BPCUSMVT

No

Customer transactions

SALESREP

No

Sales reps

STOALL

No

Allocations

ITMMASTER

No

Products

ITMSALES

No

Sales product

ITMBPC

No

Product-customer

ITMFACILIT

No

Product-site

ITMMVT

No

Product movements

TABCUR

No

Currency table

FACILIT

No

Sites

SPRICLINK

No

Search sales price lists (Link)

PRICSTRUCT

No

Price list structure

BPCARRIER

No

Carriers

TABMODELIV

No

Delivery mode table

STOPREH

Yes

Header pick ticket

STOPRED

No

Detail pick ticket

SUB_TOT: Calculate total amounts for a delivery

Context and operating method

Transaction

There is no transaction in progress.

Log file

No log file is open.

Code context

This entry point is called in the deliveries management:

Available variables and masks

This entry point is called in the SUB_TOT label of the SUBSDHB process. This label decrements the different delivery header amounts with the amounts of the line being created or modified.

Depending on the context, the call to the SUB_TOT label is followed by the call to the ADD_TOT label (eg. In the case of a line modification: the delivery amounts are decremented from the former line amounts then incremented with the new line amounts).

The delivery object screens are online and loaded with the delivery being created or modified.

The delivery line screen [M:SDH1] is loaded. It is indexed by the NLIG variable that therefore corresponds to nolign-1. NLIG corresponds to the index of the line being created or modified.

This entry point is called at the end of the label. The standard amounts of the delivery have been modified ([M:SDH1]DLVNOT, [M:SDH1]DLVATI, [M:SDH1]NETWEI, [M:SDH1]GROWEI, [M:SDH0]DSPTOTQTY [M:SDH0]DSPTOTWEI, [M:SDH0]DSPTOTVOL).

This entry point can be used to update the amounts or to calculate specific ones.

Open tables

Table Significant content Table title
SORDER No Order hearders
SORDERP No Order line quantities
SORDERQ No Order line prices
ITMMASTER Yes Products
ITMSALES Yes Sales product

ADD_TOT: Calculate total amounts for a delivery

Context and operating method

Transaction

There is no transaction in progress.

Log file

No log file is open.

Code context

This entry point is called in the deliveries management:

Available variables and masks

This entry point is called in the ADD_TOT label of the SUBSDHB process.
This label increments the different delivery header amounts with the amounts of the line being created or modified.

Depending on the context, the call to the ADD_TOT label is preceded by the call to the SUB_TOT label (eg. In the case of a line modification: the delivery amounts are decremented from the former line amounts then incremented with the new line amounts).

The delivery object screens are online and loaded with the delivery being created or modified.

The delivery line screen [M:SDH1] is loaded. It is indexed by the NLIG variable that therefore corresponds to nolign-1. NLIG corresponds to the index of the line being created or modified.

This entry point is called at the end of the label. The standard amounts of the delivery have been modified ([M:SDH1]DLVNOT, [M:SDH1]DLVATI, [M:SDH1]NETWEI, [M:SDH1]GROWEI, [M:SDH0]DSPTOTQTY, [M:SDH0]DSPTOTWEI, [M:SDH0]DSPTOTVOL).

This entry point can be used to update the amounts or to calculate specific ones.

Open tables

Table Significant content Table title
SORDER No Order hearders
SORDERP No Order line quantities
SORDERQ No Order line prices
ITMMASTER Yes Products
ITMSALES Yes Sales product

CALLINWEI into script SUBSDHB: Calculate line weight amounts for a delivery

Context and operating method

Transaction

There is no transaction in progress.

Log file

There is no log file open.

Code context

This entry point is called in the deliveries management:

Available variables and masks

This entry point is called in the ADD_TOT label of the SUBSDHB process. This label increments the different delivery header amounts with the amounts of the line being created or modified.

Depending on the context, the call to the ADD_TOT label is preceded by the call to the SUB_TOT label (eg. In the case of a line modification: the delivery amounts are decremented from the former line amounts then incremented with the new line amounts).

The delivery object screens are online and loaded with the delivery being created or modified.

The delivery line screen [M:SDH1] is loaded. It is indexed by the NLIG variable that therefore corresponds to nolign-1. NLIG corresponds to the index of the line being created or modified.

The amounts [M:SDH1]DLVNOT and [M:SDH1]DLVATI are calculated.

This entry point is called just before the delivery net weight and delivery gross weight incrementation [M:SDH2]NETWEI and [M:SDH2]GROWEI with the weight line (WLINWEI) being created or modified.

The amounts [M:SDH0]DSPTOTQTY , [M:SDH0]DSPTOTWEI and [M:SDH0]DSPTOTVOL) are not calculated yet.

This entry point is used to update the variable WLINWEI.

Open tables

Table Significant content Table title
SORDER No Order hearders
SORDERP No Order line quantities
SORDERQ No Order line prices
ITMMASTER Yes Products
ITMSALES Yes Sales product