TRTVENDAT processing: TRTVENDAT
CALCDAT: Custom/specific calculation of a date
This entry point concerns the calculation of a date in the sales module.
It is used to make a specific/custom calculation of the date and replaces the calculation made in standard mode.
This entry point is located in the TRTVENDAT processing, in the CALC_DAT sub-program.
It is called every time a date is calculated in sales.
Context and operating mode
Transaction
There is no transaction in progress.
Log file
There is no open log file.
Different call cases - Available variables and masks
This entry point is called:
· In order management, every time that the shipping date is calculated (according to the delivery date and delivery lead time), that the requested delivery date is calculated or that the planned delivery date is calculated (according to the shipping date and delivery lead time)
· In delivery management, every time the delivery date is calculated (according to the shipping date and the delivery lead time).
It is called in the CALC_DAT subprogram after the standard calculation for the date and before the calculated date is controlled according to the working days and the unavailable periods of the shipping site, in the case of a shipping date, or of the ship-to customer, in the case of a delivery date.
The following parameters are passed to the subprogram:
· SCONTEXTE (value char): Call context ("SHI" from orders, "DLV" from deliveries)
· ORIDAT (value date): Original date
· LTI (value integer): Lead-time
· UVYDAY (value title): Working days
· UVYCOD (value char): Code for unavailable period
· SENCAL (integer value): Sign for the calculation of the date (0=+ ;1=-)
· SENDEC (integer value): Sign for the difference if the day calculated is not worked (0=+ ;1=-)
· DSTDAT (variable date): Date destination
These variables are available for the entry point.
The entry point is located just after the standard calculation. As a result, DSTDAT is populated and is equal to ORIDAT+LTI or ORIDAT-LTI (depending on the sign of the calculation).
The EP should populate DSTDAT.
The entry point is located just before the control performed on the calculated date DSTDAT.
The WPE_CTLDAT (local integer) variable has been added to avoid performing this control. WPE_CTLDAT is initialized to 1. It must set to 0 to avoid performing the control.
When managing orders, the screen classes SOH0 SOH1 SOH2 SOH3 SOH4 are available.
When managing deliveries, the screen classes SDH0 SDH1 SDH2 SDH3 are available.
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…
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 |
|
Order management |
|||
SORDER |
No |
Order headers |
|
SORDERQ |
No |
Order line quantities |
|
SORDERP |
No |
Order line prices |
|
SORDERC |
No |
Product / customer orders (open orders) |
|
BPARTNER |
No |
BP |
|
BPCUSTOMER |
No |
Customers |
|
BPDLVCUST |
No |
Ship-to customers |
|
FACILITY |
No |
Sites |
|
Delivery management |
|||
SDELIVERY |
No |
Delivery header |
|
SDELIVERYD |
No |
Delivery line |
|
BPARTNER |
No |
BP |
|
BPCUSTOMER |
No |
Customers |
|
BPDLVCUST |
No |
Ship-to customers |
|
FACILITY |
No |
Sites |
|