SUBPRHB processing: SUBPRHB
CHG_ALLTYP: to choose the allocation method on the pick ticket
This entry point is called when using the 'Pick ticket' button from order management.
It is called just before the processing of an order line in order to modify the desired allocation type on the pick ticket.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
There is no open log file.
Different call cases - Significant variables
To modify the allocation type, it is necessary to intervene on the WALLTYPFLG local variable.
By default WALLTYPFLG = 2 (detailed allocation).
To force the global allocation, set: WALLTYPFLG = 1 (this will however have no effect if the order is already allocated in detail).
To comply with the order allocation type, set: WALLTYPFLG = [F:SOQ]ALLTYP
BEFWRIPRH: Before writing the pick ticket header
This entry point is called before the "Write" instruction for each new pick ticket header.
The STOPREH [PRH] table buffer is loaded and can be modified with the usual care.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
There can be an open log file according to the movement type (GTRACE test).
Different call cases
Systematic call.
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 |
Yes |
Sales orders - header |
PRHGENLIN: Custom processing before pick ticket line creation
This entry point is executed when a sales order is prepared with the "Preparation" button in the sales order function.
It allows to intervene just before the processing of each pick ticket detail line to replace or not the process by another one.
Context and operating mode
Transaction
When processing the first pick ticket line, there is no transaction in progress.
The update transaction starts when the first line is created.
For subsequent lines, a transaction is in progress.
Log file
No log file is open.
Code context
We are at the detail line processing level, in the read loop of [M:SOH4] grid.
"I" variable corresponds to the sales order line being processed.
The entry point is called for each pick ticket line to create, just before the call to the label DETAIL_BON (which proceeds to the pick ticket line creation).
It allows to not execute this label or/and execute another one.
The pick ticket header has not been processed (it will be once all lines have been processed).
Available variable and masks
The following records and screens are loaded:
[F:SOQ] and [F:SOP] are loaded and on line
[F:SOQ] with a logic lock
Sales order screens: [M:SOH0], [M:SOH1], [M:SOH2], [M:SOH3], [M:SOH4]
The DETAIL_BON label :
Reads [F:ITM] record
Feds [F:PRE] and creates it
Updates the sales order line (and ORDERS table)
Updates the allocations
All these processes will not be executed if the entry point is activated.
To activate the entry point, the variable WPOINT_GEN_LIN has been created.
It is initialized to 1 before the entry point is called, and tested immediately after the call. DETAIL_BON label is only executed if WPOINT_GEN_LIN is set to 1.
If DETAIL_BON label has to be replaced, the entry point must be modeled on its content and integrated into the entry point.
Open tables
In the table below, the significant content flag indicates that the content is in phase with the context.
Table | Significant content | Table Title |
---|---|---|
SORDER | Yes | Sales order header |
SORDERQ | Yes | Sales order line - quantity |
SORDERP | Yes | Sales order line - price |