Process SUBSDHA: Shipment Management
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.
It is called in the shipment management processing SUBSDHA at the time of the creation or the modification of a shipment. It can also be called after the entry in the shipment address window.
Context and operating method
Transaction
There is no transaction in process when the entry point is called at the time of the creation or modification of a shipment.
There is a transaction in process when the entry point is called after entry in the shipment address window. (Address update transaction and the freight amount in the shipment header file).
Log file
There is no open log file.
Different call cases - Available variables and masks
This entry point is called in shipment management:
· At the time of the creation or the modification of a shipment, at the time of the carrier price search.
The carrier price search is located in the VERIF_CRE (at the time of shipment creation) and VERIF_MOD (at the time of shipment modification) actions. These actions are executed before the start of the entry or re-entry transaction. The OK variable is equal to 1. It is possible to set it to 0 if the transaction should not be carried out.
The [M:SDH] screen class linked to the shipment object is loaded, the [F:SDH] buffer is not yet loaded.
· When the shipment address is modified by the shipment address option in the menu (If in creation or duplication phase or if no modification has yet been carried out).
If the country, town or postcode fields have been modified and if the user requests a new carrier price search.
The [M:SDH] screen class linked to the shipment object is loaded. The [F:SDH] buffer is loaded because the record has been read and is locked.
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 shipment 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 shipment 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 shipment 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 the WPOINT_ENTREE to 1.
. Set LAMTFRE with the calculated freight amount.
. Set STAT to 0 for the selection of this amount to be carried out.
. Set OK to 0 if it is not necessary to carry out the creation/modification transaction (in the call case VERIF_CRE and VERIF_MOD).
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...). Traditionally, this is the case for the file that contains the header and not the file that contains the lines...
Table |
Significant content |
Table Title |
SDELIVERY |
No Yes (if from the menu Shipment address) |
Shipment header |
SDELIVERYD |
No |
Shipment line |
SORDER |
No |
Order headers |
SORDERQ |
No |
Order line quantities |
SORDERP |
No |
Order line prices |
SORDERC |
No |
Product / customer orders (contract orders) |
BPARTNER |
No |
BP |
BPCUSTOMER |
No |
Customers |
BPDLVCUST |
No |
Ship-to customers |
BPCUSTMVT |
No |
Customer transactions |
SALESREP |
No |
Sales representatives |
STOALL |
No |
Allocations |
ITMMASTER |
No |
Products |
ITMSALES |
No |
Products - Sales |
ITMBPC |
No |
Products - Customers |
ITMFACILIT |
No |
Products - Sites |
ITMMVT |
No |
Product - Movements |
TABCUR |
No |
Currencies |
FACILITY |
No |
Sites |
SPRICLINK |
No |
Search sales prices (link) |
PRICSTRUCT |
No |
Price list structure |
SFOOTINV |
Yes |
Invoicing elements |
BPADDRESS |
Yes (if the shipment address window is empty) |
Addresses |
UPDCFMSDD: Specific/custom files update before the update of a validated shipmen
This entry point is used during the modification of a validated shipment line.
It is used to insert additional logic just before the update of the shipment line to update the specific/custom tables.
It is called in the shipment management, during the use of the right click "Issue modification" available on the validated shipment line (it is the only way to modify a validated shipment line, the modification corresponds solely to the stock movement modification and thus the quantity shipped).
Context and operating method
Transaction
There is one transaction in progress. It is the stock movement update and shipment update transaction.
To cancel the transaction if there is a problem, the GOK variable must be set to 0.
Log file
There is no open log file.
Call context
The PE is located at the level of the issue modification window, after having entered the modification and used the "Save" button.
It is called in the ENR action of the SAISTOSOM action.
It is located in the issue movement update transaction. The update of the issue movements has been carried out.
This is at the level of the additional updates this corresponds to this specific case at the update of the shipment line after the read of the line and before its update or deletion (if the new quantity shipped is 0).
Available variables and masks
The screen class [M :SOM] is on line :
[M :SOM]NBLIG contains the line number of the processed stock.
[M :SOM]SORQTY contains the STK quantity that was to be issued
[M :SOM]SORQTYACT contains the quantity in PUR that was to be issued
[M :SOM]PECQTY contains the issue quantity STK
[M :SOM]PECQTYACT contains the issue quantity in PUR
[M :SOM]SHTQTY contains the missing quantity
A readlock has been carried out on the shipment detail record ([F:SDD] loaded).
The [M :SDH0], [M :SDH1], [M :SDH2], [M :SDH3] screens are on-line and loaded with the shipment data.
LNOL contains the shipment line index that is currently being processed in the shipment lines grid.
The LQTYSTU variable contains the new shipped quantity in STK. It corresponds to : [M:SOM]PECQTY+[M:SOM]SHTQTY.
The LQTY variable contains the new shipped quantity in SAL (Sales unit).
The DELTAQTYSTU variable contains the difference in STK units between the new and previous shipped quantity.
The DELTAQTY variable contains the difference in SAL units between the new and previous shipped quantity.
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...). Traditionally, this is the case for the file that contains the header and not the file that contains the lines...
Table |
Significant content |
Table Title |
ITMCATEG |
Yes |
Product categories |
ITMMASTER |
Yes |
Products |
ITMFACILIT |
Yes |
Product-site |
ITMMVT |
Yes |
Product - Movements |
TABALLRUL |
No |
Allocations/issue rules |
TABSTORUL |
No |
Stock management rules |
STOLOT |
No |
Lot numbers |
STOCK |
No |
Stocks |
STOSER |
No |
Serial number |
STOWIPW |
No |
Stock currently being processed |
STOJOU |
No |
Stock journal |
ITMSALES |
Yes |
Product-sales |
ITMBPC |
Yes |
Product-customer |
SDELIVERY |
No |
Shipment header |
SDELIVERYD |
Yes |
Shipment detail |