Process TRTACHPSH1: TRTACHPSH1
CONSOPSH: Force the closure during the partial consumption of the Purchase reque
This entry point is located in the purchase request process TRTACHPSH1, generates as action "CONSOPSH".
The goal of this action is to give the possibility to close a purchase request line that is partially consumed, that is to say partially transformed into order.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
The call is made during the creation of the purchase orders for each "POP" requirement (coming from a purchase request) taken into account.
This takes place irrespective of the fashion in which the order is created, classic order management, generation from the buyer plan or the replenishment plans.
Available variables and masks
The following classes are loaded during the call to the "CONSOPSH" action.
[F :PSH]
Purchase request header record taken into account (PREQUIS table)
[F :PSD]
Purchase request line record taken into account (PREQUISD table)
[F :PWO]
Work record containing the quantities in PUR and STK units (PWRKORDERS table)
[M :POI1] or [M :POH0] to [M :POH3]
All these classes are not present at the same time.
The class [M :POI1] is present : The order is generated from the plans.
The [M :POH0] to [M :POH3] classes are present : The order is created from the order management.
The previous classes must not be modified.
The following variable must be modified to force the closure of the consumed purchase request line.
WSOLDPSH
Flag for the closure of the purchase request line
0 or 1 = Normal functioning, the line will be closed if it has been entirely transformed into an order.
2 = The closure is forced to YES even if the line has not entirely been transformed into an order.
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 |
PREQUIS |
Yes |
Purchase request headers |
PREQUISD |
Yes |
Purchase request lines |
PWRKORDERS |
Yes |
Requirements taken into account |
ITMMASTER |
Products |
|
ITMBPS |
Products - Suppliers |
|
FACILITY |
Sites |
|
ITMFACILITY |
Product-sites |
|
ITMMVT |
Product-site movement totals |
|
PORDER |
Purchase order headers |
|
PORDERQ |
Purchase order line quantities |
|
PORDERP |
Purchase order line prices |
|
PPRICLINK |
To search price lists |
|
BPSUPPLIER |
Suppliers |
|
BPARTNER |
BP |
|
BPSUPPMVT |
Supplier transactions |
Miscellaneous remarks
At the time of the call to the entry point:
· We are within the interior of a loop For Next File PWRKORDERS [PWO]
CREATEPSH: Modify the grouping management upon PR creation
This entry point is located in the purchase request processing TRTACHPSH1, generates as action "CREATEPSH".
The goal of this action is to give the possibility to split purchase request lines when the requirement dates differ.
Context and operating method
Transaction
There is no transaction in process.
Log file
There is an open log file.
Different call cases
Generation of purchase requests from the requirements selected in the product workbenches.
The call is made before creating the purchase requests.
Available variables and masks
The [M:PMG] is loaded during the call to the action "CREATEPSH".
[M:PMG]RGRFLG
Grouping code, this variable can take the following values:
1 = No grouping, a requirement results compulsorily in a line purchase request.
2 = Grouping: A grouping results in a line purchase request.
3 = Grouping: Every grouping does not result in a line for the same purchase request
The following variables can be modified to change the distribution/regrouping after taking the requirements into account.
WSRTFLG
Sort indicator (0 = standard sort, 1 = custom/specific sort).
ECLAT_DAT
Distribution by requirement date (1 = No, 2 = Yes).
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 |
PREQUIS |
|
Purchase request headers |
PREQUISD |
|
Purchase request lines |
ITMMASTER |
|
Products |
ITMBPS |
|
Products - Suppliers |
FACILITY |
|
Sites |
ITMFACILITY |
|
Products - Sites |
ITMMVT |
|
Product-site movement totals |
PPRICLINK |
|
To search price lists |
BPSUPPLIER |
|
Suppliers |
BPARTNER |
|
BP |
BPSUPPMVT |
|
Supplier transactions |
Miscellaneous remarks
The default values for the distribution flags are as follows:
WSRTFLG = 0 No specific sort
ECLAT_DAT = 1 No distribution on requirement date (grouping and consideration based on the earliest date).
The sort carried out in standard mode is used to manage properly the splitting of requirement dates.
CALORDDAT: Modify the theoretical date for the order upon PR
This entry point is located in the purchase request process TRTACHPSH1, generates as action "CALORDDAT".
The goal of this action is to give the possibility to modify the theoretical order date upon creation or modification of a purchase request line.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
Generation or modification of purchase requests from the requirements selected in the product workbenches.
The call is made after calculation of the theoretical order date and before writing or rewriting the purchase request line.
Available variables and masks
Classes [M:PMG], [F :PSD], [F :ITM] and [F :ITF] are loaded when calling action "CALORDDAT".
[M:PMG]MAJCOD
Update code:
"C" = Creation of purchase requests.
"M" = Modification of purchase requests.
[F :PSD]EXTRCPDAT
Requested due date.
[F :ITF]OFS
Reorder lead-time.
[F :ITF]QUALTI
Quality control lead-time.
[F :PSD]EXTORDDAT
Theoretical order date (result of the calculation): requested due date less reorder lead-time for the product or product-site).
This date can be modified by the entry point, for instance in order to take into account the quality control lead-time.
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 |
PREQUIS |
|
Purchase request headers |
PREQUISD |
Yes |
Purchase request lines |
ITMMASTER |
Yes |
Products |
ITMBPS |
|
Products - Suppliers |
FACILITY |
|
Sites |
ITMFACILITY |
Yes |
Products - Sites |
ITMMVT |
|
Product-site movement totals |
PPRICLINK |
|
To search price lists |
BPSUPPLIER |
|
Suppliers |
BPARTNER |
|
BP |
BPSUPPMVT |
|
Supplier transactions |
Miscellaneous remarks
GENPSH: Loading the specific/custom fields before PR entry
This entry point located in the TRTACHPSH1 purchase request management processing, generates a "GENPSH" action.
The aim of this action is to provide the possibility to load specific/custom fields in the records in the purchase request tables prior to entry.
N.B.: This entry point is called only during automatic generation of purchase requests from the enterprise workbench, product workbench and grouping workbench.
This entry point cannot be used when the purchase requests are created manually with the help of the PSH object management.
It should be noted that this context uses the actions specific to the PSH object.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
During the automatic generation of purchase requests, the call is made before the "Write" for each of the purchase request tables.
These tables are the purchase request header (PREQUIS) and the purchase request line (PREQUISD).
The call is made after calculation of the theoretical order date and before writing or rewriting the purchase request line.
Available variables and masks
The following variables are loaded at the time of the call to the"GENPSH" action.
[V]GOK
When set to 0, this global variable is used to abort the update transaction for the current purchase request (Rollback).
FILE
Name of the table that will be written to (PREQUIS or PREQUISD).
ABRFIC
Abbreviation for the table that will be written to (PSH or PSD).
The variables given above must not be modified.
The following classes can be modified to load the specific/custom fields:
[F:PSH] if FILE = "PREQUIS" and ABRFIC = "PSH"
[F:PSD] if FILE = "PREQUISD" and ABRFIC = "PSD"
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 |
BPARTNER |
Yes |
Business Partner |
BPSUPPLIER |
Yes |
Suppliers |
BPSUPPMVT |
|
Supplier transactions |
PREQUIS |
Yes |
Purchase request headers |
PREQUISD |
Yes |
Purchase request lines |
PPRICLINK |
|
Search purchase prices (Link) |
FACILITY |
|
Sites |
ITMMASTER |
Yes |
Products |
ITMBPS |
|
Products-Suppliers |
ITMFACILITY |
|
Products - Sites |
ITMMVT |
|
Product-site movement totals |
ORDERS |
|
Pending movements |
TABCUR |
|
Currencies |
TABCOEFF |
|
Coefficients |
PERIOD |
|
Periods |
BUDPAR |
|
Budget setup if the accounting module is present |