SUBSOHB processing: SUBSOHB
SOHALLSEL: Add authorization controls to the order line to be allocated
Use this entry point to take over at the end of the authorization controls for the allocation of an order line.
It is thus used to add additional controls and tests that are used to reject the order line to allocate.
It is also called upon execution of the 'Allocation' button in order management.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
There is no open log file.
Call context
This entry point is called for each order line to allocate, after the authorization controls for the line allocation.
Available variables and masks
The WTRTALL variable contains the type of processing to carry out:
1 = Allocation
2 = Deallocation
The following local variables are also on line:
- WALLCTM Deallocation of products managed with back-to-back order (1=no / 2=yes)
- SHTFLG Allocations of the shortages only (1=no / 2=yes )
- ALLPAR Partial allocations authorized ( 1 = no / 2 = yes )
- IMPCLI Posting of the customer allocations ( 1 = no / 2 = yes )
The order header screen classes are loaded:
[M:SOH0], [M:SOH1], [M:SOH2] and [M:SOH3]
The screen class for the order line to allocate is on line:
[M:SOH4] It is indexed with the I variable, which therefore corresponds to nolign-1.
To reject an order line, it is necessary to set the OK variable to 1.
If a message must accompany the rejection of an order line, it will be necessary to enter it in the WMESS1 variable in the form of a string of characters.
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 |
SORDER |
No |
Order headers |
SORDERQ |
No |
Order line quantities |
SORDERP |
No |
Order line prices |
ITMMASTER |
No |
Products |
ITMSALES |
No |
Sales product |
MODQTEALL: Modification of the quantity to allocate to an order line
This entry point concerns the allocation of an order.
It is used to take over after the determination of the quantity to allocate for each order line in order to act on this quantity.
It is also called upon execution of the 'Allocation' button in order management.
Context and operating mode
Transaction
There is a transaction in progress (allocation update transaction, with update of the order line, the corresponding credit and the order header).
The GOK variable is used and tested. It is equal to 1. It can be set to 0 if the transaction is to be abandoned.
Log file
There is an open log file.
It gives, for each order line processed, the allocated quantity and/or the shortage quantity, and for each non processed line, the reason why the allocation could not be carried out.
Call context
This entry point is called for each order line to allocate, after the determination of the quantity to allocate and therefore, before the different updates (allocation, order line, credit levels, order header).
Available variables and masks
The WTRTALL variable contains the type of processing to carry out. It has the value 1 = Allocation.
The following local variables are also on line:
- WALLCTM Deallocation of products managed with back-to-back order (1=no / 2=yes )
- WSHTFLG Allocations of the shortages only (1=no / 2=yes)
- WGENSHT Generation of the shortages (1=no / 2=yes)
- WALLPAR Partial allocations authorized (1=no / 2=yes)
- WIMPCLI Posting of the customer allocations (1=no / 2=yes)
The order header screen classes are loaded:
[M:SOH0], [M:SOH1], [M:SOH2] and [M:SOH3]
The screen class for the order line to allocate is on line:
[M:SOH4] It is indexed with the I variable, which therefore corresponds to nolign-1.
The local variable containing the quantity to allocate is : WALLSTU. It is necessary to act on this local variable.
Just before the entry point, WALLSTU is automatically loaded as follows:
WALLSTU = [M:SOH4]QTYSTU (I)– [M:SOH4]TALLQTYSTU(I) - WSHTSTU
The WSHTSTU variable contains the quantity on shortage for the order line.
The [M :SOH4]TALLQTYSTU variable contains the quantity already allocated to the order line, plus the quantities being delivered and already delivered.
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…).
Table |
Significant content |
Table Title |
SORDER |
No |
Order headers |
SORDERQ |
No |
Order line quantities |
SORDERP |
No |
Order line prices |
ITMMASTER |
No |
Products |
ITMSALES |
No |
Sales product |
MAJCDEALL: Additional update of an order to allocate
Use this entry point to take over after the allocation/deallocation of an order in order to carry out additional updates on this order.
It is called in the sales order management when using the "Allocation" button.
Context and operating mode
Transaction
There is a transaction in progress (order allocation/deallocation transaction, with update of each line, of allocations and of the corresponding credit levels, then the update of the order header).
The GOK variable is used and tested. It is equal to 1. It can be set to 0 if the transaction is to be abandoned.
Log file
There is an open log file.
It gives for each order line processed, the allocated/deallocated quantity and/or the shortage quantity, and for each non processed line, the reason why the allocation could not be carried out.
Call context
This entry point is called in the sales order management when clicking the "Allocation". It is called either during the allocation or the deallocation of a order.
It is called at the end of the update transaction :
- All the order lines have been processed: The allocations have been carried out, the lines have been updated as well as the corresponding credit levels.
- The order header has also been updated but only when needed (a readlock followed by an update has been carried out).
The entry point is located just after the update of the order.
Available variables and masks
The order object masks are loaded, they have been reloaded according to the allocations carried out.
If the EP is used to carry out additional updates of the order header, it is necessary to reread it with blocking. If it is used to carry out additional updates of the order lines, it is also necessary to carry out line read loop again.
The following local variables are on line :
- WTRTALL Type of processing to carry out (1 = Allocation / 2 = Deallocation)
- WALLCTM Deallocation of products managed with back-to-back order ( 1 = no / 2 = yes )
- WRAZCTM RTZ of the back-to-back no. ( 1 = no / 2 = yes )
- WSHTFLG Allocation of the shortages only ( 1 = yes / 2 = no )
- WGENSHT Generation of the shortages ( 1 = no / 2 = yes )
- WALLPAR Partial allocations authorized ( 1 = no / 2 = yes )
- WIMPCLI Posting of the customer allocations ( 1 = no / 2 = yes )
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…).
Table |
Significant content |
Table Title |
SORDER |
No |
Order headers |
SORDERQ |
No |
Order line quantities |
SORDERP |
No |
Order line prices |
ITMMASTER |
No |
Products |
ITMSALES |
No |
Sales product |
RECALCLIG: Impact of the modifications of order header fields on detail lines
This entry point is called in order management.
It is used to take over and act during the modification of some fields of the order header when the user has requested that the modifications be passed on the detail lines. It can also be used to pass on the modification of specific fields.
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 modifying the following fields of the order header if the user has requested a impact on the detail lines:
. Delivery address
. Sales reps
. Shipment site
. Delivery priority
. Requested delivery date
. Delivery lead time
. Shipment date
. Delivery method
. Carrier.
.When modifying the following fields of the order header if the user has requested a recalculation of the price list of all the lines:
. Order date
. Order customer (only in order duplication)
. Currency (only in order duplication)
. Price type.
.During modification of the following fields of the order header:
. Tax rule: A recalculation of the prices, the margin, and the line totals is carried out automatically.
. Currency: If the user has not requested a recalculation of the price list, a conversion of the amounts of the lines and a recalculation of the totals is carried out automatically.
. Price type: If the user has not requested a recalculation of the price list, a switch from the excl. tax to the incl. prices is automatically carried out.
. Allocation type: A repercussion on the detail lines is carried out automatically.
The entry point is called in the various actions, after modification of these fields (eg.: AM_CUR, AM_STOFCY, etc.). It is located in the line modification loop, at the end of the modification of each line, right before moving to the next line. The current line has thus been modified with all the corresponding updates.
Available variables and masks
The various order management screens are on line and loaded with the order being modified.
The [M:SOH4] order line screen is loaded. It is indexed by the NLIG variable that therefore corresponds to nolign-1. NLIG corresponds to the index of the line being modified.
- WZONCOU contains the name of the modified header field. VALEUR contains the new value of the field.
- GTARFLG is equal to 1 if recalculating a price list.
For the CUR field, WANCCUR contains the value of the field before modification. For the PRITYP field, WANCPRITYP contains the value of the field before modification. For the VACBPR field, WANCVACBPR contains the value of the field before modification.
When in the case of repercussions of modifications on the detail:
- FFLGMOD is equal to 1 if the user has answered "Yes". - FFLGMOD is equal to 3 if the user has answered "Value" (Repercussion if the value of the field on the line is equal to the value of the header before modification).
- NOME contains the name of the header field (ex: REP(0) or BPAADD).
- NOMD is an evaluated variable containing the name of the line field (ex: REP1 or DBPAADD).
- VALEUR will be impacted on [M]NOMD.
If the EP is used to impact the modification of specific fields, the TRTMAJDET action must be first added in the AM_ of the header field. Then, two cases are possible:
- The name of the field of the detail line= D+name of the header field (ex: BPAADD and DBPAADD). There is nothing in particular to do in the EP. The standard processing is enough.
- The name of the field of the detail line is different from the name of the header field. In the EP, VALEUR should be loaded into the field of the detail line:
[M :SOH4]CHAMPSPE (NLIG) = VALEUR.
Open tables
The open tables are the tables of the order object.
Table |
Significant content |
Table Title |
SORDER |
No |
Order headers |
SORDERQ |
No |
Order line quantities |
SORDERP |
No |
Order line prices |
ITMMASTER |
Yes |
Products |
ITMSALES |
Yes |
Sales product |
… |
MAJSOQALL: Additional update of an order line to allocate
This entry point is used to take over after the allocation/deallocation of an order line in order to carry out additional updates.
It is called in the sales order management when using the "Allocation" button.
Context and operating mode
Transaction
There is a transaction in progress (order allocation/deallocation transaction, with update of each line, of allocations and of the corresponding credit levels, then the update of the order header).
The GOK variable is used and tested. It is equal to 1. It can be set to 0 if the transaction is to be abandoned.
Log file
There is an open log file.
It gives for each order line processed, the allocated/deallocated quantity and/or the shortage quantity, and for each non processed line, the reason why the allocation could not be carried out.
Call context
This entry point is called in the sales order management when clicking the "Allocation". It is called either during the allocation or the deallocation of a order.
It is called in the order line processing loop, just after the update of the order line (Enr [F:SOQ] that is thus on line), before the update of the credit level update and reloading of the new order line values of the [M:SOH4] screen. The order line has been allocated and the files updated.
Available variables and masks
The following local variables are on line :
- WTRTALL Type of processing to be carried out (1=Allocation / 2=Deallocation)
- WALLCTM Deallocation of the products managed with back-to-back order (1=no / 2=yes)
- WRAZCTM RTZ of the back-to-back no. ( 1 = no / 2 = yes )
- WSHTFLG Allocation of the shortages only (1=yes / 2=no)
- WGENSHT Generation of the shortages (1=no / 2=yes)
- WALLPAR Partial allocations authorized (1=no / 2=yes)
- WIMPCLI Posting of the customer allocations (1=no / 2=yes)
The order header screen classes are loaded:
[M:SOH0], [M:SOH1], [M:SOH2] and [M:SOH3]
The screen class for the order line allocated is on line:
[M:SOH4] It is indexed with the I variable, which therefore corresponds to nolign-1.
The local variables containing the allocated quantities are WALL (Qty allocated in SAL), WALLSTU (Qty allocated in STK), WSHT (Shortage in SAL), WSHTSTU (Shortage in STK).
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…).
The open tables are the tables opened by the SOH object.
Table |
Significant content |
Table Title |
SORDER |
No |
Order headers |
SORDERQ |
Yes |
Order line quantities |
SORDERP |
Yes |
Order line prices |
ITMMASTER |
Yes |
Products |
ITMSALES |
No |
Sales product |
NOUPDLIN: Impact of the modifications of order header fields on detail lines
This entry point is called in order management.
It is used to take over and act during the modification of some fields of the order header when the user has requested that the modifications be passed on the detail lines. It is used to prevent the modification of the header values on the lines from being passed on.
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 modifying the following fields of the order header if the user has requested a impact on the detail lines:
. Delivery address
. Sales reps
. Shipment site
. Delivery priority
. Requested delivery date
. Delivery lead time
. Shipment date
. Delivery method
. Carrier.
.When modifying the following fields of the order header if the user has requested a recalculation of the price list of all the lines:
. Order date
. Order customer (only in order duplication)
. Currency (only in order duplication)
. Price type.
.During modification of the following fields of the order header:
. Tax rule: A recalculation of the prices, the margin, and the line totals is carried out automatically.
. Currency: If the user has not requested a recalculation of the price list, a conversion of the amounts of the lines and a recalculation of the totals is carried out automatically.
. Price type: If the user has not requested a recalculation of the price list, a switch from the excl. tax to the incl. prices is automatically carried out.
. Allocation type: A repercussion on the detail lines is carried out automatically.
The entry point is calculated in the various actions, after modification of these fields (ex: AM_CUR, AM_STOFCY, etc.). It is located in the line modification loop before the line is updated with the new header value.
Available variables and masks
The various order management screens are on line and loaded with the order being modified.
The [M:SOH4] order line screen is loaded. It is indexed by the NLIG variable that therefore corresponds to nolign-1. NLIG corresponds to the index of the line being modified.
- WZONCOU contains the name of the modified header field. - VALEUR contains the new value of the field.
- GTARFLG is equal to 1 if recalculating a price list.
For the CUR field, WANCCUR contains the value of the field before modification. For the PRITYP field, WANCPRITYP contains the value of the field before modification. For the VACBPR field, WANCVACBPR contains the value of the field before modification.
When in the case of repercussions of modifications on the detail:
- FFLGMOD is equal to 1 if the user has answered "Yes". - FFLGMOD is equal to 3 if the user has answered "Value" (Repercussion if the value of the field on the line is equal to the value of the header before modification).
- NOME contains the name of the header field (ex: REP(0) or BPAADD).
- NOMD is an evaluated variable containing the name of the line field (ex: REP1 or DBPAADD).
- VALEUR will be impacted on [M]NOMD.
- WGPE is the variable used to prevent the new header value on lines from being transferred when setting the variable to 1. Warning: to preserve the data integrity, it is not possible to act on the transfer of STOFCY and BPAADD when the LINBPD general parameter is set to no.
Open tables
The open tables are the tables of the order object.
Table |
Significant content |
Table Title |
SORDER |
No |
Order headers |
SORDERQ |
No |
Order line quantities |
SORDERP |
No |
Order line prices |
ITMMASTER |
Yes |
Products |
ITMSALES |
Yes |
Sales product |
… |
|
|
ADD_TOT: Calculating the total amounts of an order
This entry point is called in order management.
It is used to take over during the processing of an order line when calculating the different amounts of an order. It can be used to calculate specific amounts.
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 in order management:
. At line end (end without validation, creation, modification).
. Upon picking a quote line.
. On the "Price calculation" button via the Action button on a line.
. .When modifying the following fields of the order header if the user has requested a recalculation of the price list of all the lines:
. Order date
. Order customer (only in order duplication)
. Currency (only in order duplication)
. Price type.
. During modification of the following fields of the order header:
. Sold-to customer: (only in order duplication) If the user has not requested a price list recalculation, a recalculation of the prices, the margin and the line totals is automatically carried out.
. Tax rule: A recalculation of the prices, the margin, and the line totals is carried out automatically.
. Currency: (only in order duplication) If the user has not requested a recalculation of the price list, a conversion of the amounts of the lines is carried out automatically.
. It is called when searching for groups upon creation/modification of the order for the lines modified by the search.
Available variables and masks
This entry point is called in the ADD_TOT sub-program of the SUBSOHB processing. This sub-program increments the different header amounts of the order with the amounts of the line being created/modified. Depending on the context, the call to the ADD_TOT sub-program is preceded by the call to the SUB_TOT sub-program (in the case of the modification of a line for example, the order amounts are decremented from the former line amounts then incremented with the new line amounts).
The various invoice management screens are on line and loaded with the order being created/modified.
The [M:SOH4] order line screen 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/modified.
This entry point is called at the end of the sub-program. The different standard amount of the order have been modified ([M:SOH4]ORDNOT, [M:SOH4]ORDATI, [M:SOH4]DLRNOT, [M:SOH4]DLRATI, [M:SOH4]PFMTOT, etc.).
This entry point can be used to update the specific amounts.
Open tables
The open tables are the tables of the order object.
Table |
Significant content |
Table Title |
SORDER |
No |
Order headers |
SORDERQ |
No |
Order line quantities |
SORDERP |
No |
Order line prices |
ITMMASTER |
Yes |
Products |
ITMSALES |
Yes |
Sales product |
… |
|
|
SUB_TOT: Calculating the total amounts of an order
This entry point is called in order management.
It is used to take over during the processing of an order line when calculating the different amounts of an order. It can be used to calculate specific amounts.
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 in order management:
. At line end.
. On the "Price calculation" button via the Action button on a line.
. When searching for groups upon order creation/modification for the lines modified by the search.
Available variables and masks
This entry point is called in the SUB-TOT sub-program of the SUBSOHB processing. This sub-program decrements the different header amounts of the order with the amounts of the line being created/modified. Depending on the context, the call to the SUB_TOT sub-program is followed by the call to the ADD_TOT sub-program (in the case of the modification of a line for example, the order amounts are decremented from the former line amounts then incremented with the new line amounts).
The various invoice management screens are on line and loaded with the order being created/modified.
The [M:SOH4] order line screen 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/modified.
This entry point is called at the end of the sub-program. The different standard amount of the order have been modified ([M:SOH4]ORDNOT, [M:SOH4]ORDATI, [M:SOH4]DLRNOT, [M:SOH4]DLRATI, [M:SOH4]PFMTOT, etc.).
This entry point can be used to update the specific amounts.
Open tables
The open tables are the tables of the order object.
Table |
Significant content |
Table Title |
SORDER |
No |
Order headers |
SORDERQ |
No |
Order line quantities |
SORDERP |
No |
Order line prices |
ITMMASTER |
Yes |
Products |
ITMSALES |
Yes |
Sales product |
… |
|
|