Process TRTVENISOC: TRTVENISOC
ALIMSKSOH: Load [M] order header in inter-company order generation
Use this entry point in a multi-company context to intervene during the automatic generation of a sales order from a purchase order.
Use this entry point to take control after the fields in the order screens are loaded.
Use it to load specific or custom fields in the sales order management screens and in the SORDER, SORDERP and SORDERQ tables.
It is called in the purchase order management upon generation, creation or modification of a sales order from the purchase order.
Context and operating mode
Transaction
There is one transaction in progress.
The GOK variable is used and tested and is equal to 1. Set the GOK to 0 if the transaction is to be abandoned.
Log file
There is an open log file.
Call context
This entry point is called from the management of an inter-company purchase order if there is an automatic generation of the sales order. It is called when creating or modifying the purchase order in the CREATION or MODIF object actions.
It is called after the update of the purchase order, after the sales order screens are loaded from the purchase order screens.
It is called just before the sales order is updated. This update is performed as similarly as possible to the interactive update. It executes all the actions called by the sales order object.
The entry point is located just before the call to the VERIF_CRE, INICRE, CREATION or VERIF_MOD, INIMOD and MODIF actions for the sales order object.
Available variables and masks
- The masks of the POH object are online and loaded with the purchase order currently being processed.
- The masks of the SOH object are online. They are loaded from the purchase order and completed with a screen class as complete as it would be in interactive sales order management just before the update.
- The variables used by GOBJET are loaded. As a result, GREP is set to C or M.
This entry point can be used to update standard fields.
You need to check on a case-by-case basis if this is possible and what it leads to.
For example, if the entry point is used to change the type of the order, you also need to re-load the GCPT (sequence number counter code) and the GMANCOU (manual sequence number counter flag) global variables.
Open tables
In the table below, the significant content column indicates that the content matches 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 contains the lines.
The open tables are the tables opened by the purchase order object and the sales order object.
| Table | Significant content | Table title |
|---|---|---|
|
SORDER |
No |
Order headers |
|
SORDERQ |
No |
Order line quantities |
|
SORDERP |
No |
Order line prices |
|
BPARTNER |
No |
Business partner |
|
BPCUSTOMER |
No |
Customers |
|
BPDLVCUST |
No |
Ship-to customers |
|
ITMMASTER |
No |
Products |
|
ITMSALES |
No |
Products-sales |
|
ITMBPC |
No |
Products-customer |
|
ITMFACILIT |
No |
Products-site |
|
TABSOHTYP |
No |
Order types |
|
FACILITY |
No |
Sites |
|
TABCUR |
No |
Currency table |
|
SPRICLINK |
No |
Sales price list search (link) |
|
PRICSTRUCT |
No |
Price list structure |
|
SALESREP |
No |
Sales rep |
|
ITMBPS |
No |
Product-supplier |
|
TABCOUAFF |
No |
Sequence number table |
|
SPRICLIST |
No |
Customer price lists |
ALIMSKSOH4: Load [M] order detail in inter-company order generation
Use this entry point in a multi-company context to intervene during the automatic generation of a sales order from a purchase order.
Use it to take control when the fields of the order detail screen are loaded, after a line is loaded.
You can use it to load specific or custom fields in the detail screens in the sales order management and in the SORDERP and SORDERQ tables.
It is called in the purchase order management upon generation, creation or modification of a sales order from the purchase order.
Context and operating mode
Transaction
There is one transaction in progress.
The GOK variable is used and tested and is equal to 1. Set the GOK to 0 if the transaction is to be abandoned.
Log file
There is an open log file.
Call context
This entry point is called from the management of an inter-company purchase order if there is an automatic generation of the sales order. It is called when creating or modifying the purchase order in the CREATION or MODIF object actions.
It is called after the update of the purchase order when the sales order screens are loaded from the purchase order screens.
It is called before the sales order is updated. This update is performed as similarly as possible to the interactive update. It executes all the actions called by the sales order object.
The entry point is located before the call to the VERIF_CRE, INICRE, CREATION or VERIF_MOD, INIMOD and MODIF actions for the sales order object.
It is called after the [M:SOH0], [M:SOH1], [M:SOH2 and [M:SOH3] header screens are loaded, during the loading of the lines' screen ([M:SOH4]). It is set in the line processing loop, at the end of the loading of each order detail line.
Available variables and masks
- The masks of the POH object are online and loaded with the purchase order currently being processed.
- The masks of the SOH object are online. The header masks are loaded from the purchase order and then completed. They are completely populated.
The order detail mask (SOH4) is being loaded. The line currently being processed is populated.
- The Nolign variable is populated. Nolign-1 corresponds to the index for the line that is currently being processed in [M:SOH4].
- The NOLPOH variable is populated. NOLPOH-1 corresponds to the index for the line that is currently being processed in [M:POH2].
- The variables used by GOBJET are loaded. As a result, GREP is set to C or M.
This entry point can be used to update standard fields.
You need to check on a case-by-case basis if this is possible and what it leads to.
For example, if the entry point is used to change the gross price of an order line, you also need to recalculate the net price, the margin, the amounts for the line, as well as recalculate the amounts of the order.
Open tables
In the table below, the significant content column 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 contains the lines.
The open tables are the tables opened by the order object.
| Table | Significant content | Table title |
|---|---|---|
|
SORDER |
No |
Order headers |
|
SORDERQ |
No |
Order line quantities |
|
SORDERP |
No |
Order line prices |
|
SQUOTE |
Yes |
Quote header |
|
SQUOTED |
Yes |
Quote detail |
|
BPARTNER |
No |
Business partner |
|
BPCUSTOMER |
Yes |
Customers |
|
BPDLVCUST |
No |
Ship-to customers |
|
BPCUSTMVT |
No |
Customer transactions |
|
ITMMASTER |
Yes |
Products |
|
ITMSALES |
Yes |
Products-sales |
|
ITMBPC |
Yes |
Products-customer |
|
ITMMVT |
No |
Product movements |
|
ITMFACILIT |
Yes |
Products-site |
|
TABSOHTYP |
No |
Order types |
|
FACILITY |
No |
Sites |
|
TABCUR |
No |
Currency table |
|
SPRICLINK |
No |
Sales price list search (link) |
|
PRICSTRUCT |
No |
Price list structure |
|
SALESREP |
No |
Sales rep |
ALIPOHENT: Load [M] order header in inter-company order generation
Use this entry point in a multi-company context to intervene during the automatic generation of a sales order from a purchase order.
Use it to take control of the fields in the sales order header once they are loaded from the fields of the purchase order header.
It is called in the purchase order management upon generation, creation or modification of a sales order from the purchase order.
Context and operating mode
Transaction
There is one transaction in progress.
The GOK variable is used and tested and is equal to 1. Set the GOK to 0 if the transaction is to be abandoned.
Log file
There is an open log file.
Call context
This entry point is called from the management of an inter-company purchase order if there is an automatic generation of the sales order. It is called when creating or modifying the purchase order in the CREATION or MODIF object actions.
It is called after updating the purchase order, when the fields of the sales order are being loaded.
It is called during the loading of the [M:SOH0], [M:SOH1], [M:SOH2] and [M:SOH3] order header screens, after the fields are loaded from the purchase order fields, and before the fields coming from the customers and miscellaneous fields are loaded. The order detail screen ([M:SOH4]) is not loaded yet.
You can use this entry point, for example, to modify the type of order defined by the inter-company setup by modifying the [M:SOH0]SOHTYP field.
Available variables and masks
- The masks of the POH object are online and loaded with the purchase order currently being processed.
- The masks of the SOH object are online. They are loaded from the purchase order and completed with a screen class as complete as it would be in interactive sales order management just before the update.
- The variables used by GOBJET are loaded. As a result, GREP is set to C or M.
You can use this entry point to update standard fields.
You need to check on a case-by-case basis if this is possible and what it leads to.
For example, if the entry point is used to change the type of the order, you also need to re-load the GCPT (sequence number counter code) and the GMANCOU (manual sequence number counter flag) global variables.
Open tables
In the table below, the significant content column 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 contains the lines.
The open tables are the tables opened by the purchase order object and the sales order object.
| Table | Significant content | Table title |
|---|---|---|
|
SORDER |
No |
Order headers |
|
SORDERQ |
No |
Order line quantities |
|
SORDERP |
No |
Order line prices |
|
BPARTNER |
No |
Business partner |
|
BPCUSTOMER |
No |
Customers |
|
BPDLVCUST |
No |
Ship-to customers |
|
ITMMASTER |
No |
Products |
|
ITMSALES |
No |
Products-sales |
|
ITMBPC |
No |
Products-customer |
|
ITMFACILIT |
No |
Products-site |
|
TABSOHTYP |
No |
Order types |
|
FACILITY |
No |
Sites |
|
TABCUR |
No |
Currency table |
|
SPRICLINK |
No |
Sales price list search (link) |
|
PRICSTRUCT |
No |
Price list structure |
|
SALESREP |
No |
Sales rep |
|
ITMBPS |
No |
Product-supplier |
|
TABCOUAFF |
No |
Sequence number table |
|
SPRICLIST |
No |
Customer price lists |
BETCPYSETPRI: Price or discount line modification or price list search on sales order
Use this entry point in a multi-company context to intervene during the automatic creation or modification of a sales order during the creation or modification of a purchase order.
Use it to take control in the modification of the gross price and the charges or discounts for the sales order line during the automatic creation or modification of the sales order performed when the purchase order is created or modified.
It is called in the purchase order management when creating or modifying a sales order from the purchase order.
Context and operating mode
Transaction
There is one transaction in progress.
The GOK variable is used and tested and is equal to 1. Set the GOK to 0 if the transaction is to be abandoned.
Log file
There is an open log file.
Call context
This entry point is called from the management of an inter-company purchase order if there is an automatic generation of the sales order. It is called when creating or modifying the purchase order (in the CREATION or MODIF object actions).
The GREP global variable gives the context of creation if its value is C, or the context of modification if its value is M.
It is called after creating or updating the purchase order, when the lines of the sales order are being loaded.
It is called when the screen of the sales order line ([M:SOH4]) is loaded, after loading the fields for the delivery address, sales unit and conversion coefficient of sales unit into stock unit, from the fields of the purchase order line, and before loading the other fields of the line.
The order header screen ([M:SOH0]) and the other screens containing other data ([M:SOH0],[M:SOH1] and [M:SOH2]) are updated.
Use this entry point to:
- Modify the gross price, the charges or discounts on the sales order line. In this case, set the WRECH_TAR variable to 3 in order to re-calculate the net price and the margin.
- Force the price list search. In this case, set the WRECH_TAR variable to 2 in order to perform the price list search.
Available variables and masks
- The masks of the POH object are online and loaded with the purchase order currently being processed.
- The NOLPOH-1 variable contains the number of the current line of the purchase order.
- The masks of the SOH object are online. They are loaded from the purchase order and completed with a screen class as complete as it would be in interactive sales order management just before the update.
- The NLIG variable contains the number of the current line of the sales order.
- The variables used by GOBJET are loaded. As a result, GREP is set to C or M.
Open tables
In the table below, the significant content column indicates that the content matches he context (the current customer is loaded).
It is usually the case for the file that contains the header but not for the file that contains the lines.
The open tables are the tables opened by the purchase order object and the sales order object.
| Table | Significant content | Table title |
|---|---|---|
|
SORDER |
No |
Order headers |
|
SORDERQ |
No |
Order line quantities |
|
SORDERP |
No |
Order line prices |
|
BPARTNER |
No |
Business partner |
|
BPCUSTOMER |
No |
Customers |
|
BPDLVCUST |
No |
Ship-to customers |
|
ITMMASTER |
No |
Products |
|
ITMSALES |
No |
Products-sales |
|
ITMBPC |
No |
Products-customer |
|
ITMFACILIT |
No |
Products-site |
|
TABSOHTYP |
No |
Order types |
|
FACILITY |
No |
Sites |
|
TABCUR |
No |
Currency table |
|
SPRICLINK |
No |
Sales price list search (link) |
|
PRICSTRUCT |
No |
Price list structure |
|
SALESREP |
No |
Sales rep |
|
ITMBPS |
No |
Product-supplier |
|
TABCOUAFF |
No |
Sequence number table |
|
SPRICLIST |
No |
Customer price lists |
ALIBPAADD: Loading line delivery address
Use this entry point in a multi-company context to intervene during the automatic creation or modification of a sales order performed during the creation or modification of a purchase order.
Use it to take control in order to intervene during the initialization of the delivery address of the order lines.
It is called in the purchase order management when creating or modifying a sales order from the purchase order.
Context and operating mode
Transaction
There is one transaction in progress.
The GOK variable is used and tested and is equal to 1. Set the GOK to 0 if the transaction is to be abandoned.
Log file
There is an open log file.
Call context
This entry point is called from the management of an inter-company purchase order if there is an automatic generation of the sales order. It is called when creating or modifying the purchase order (in the CREATION or MODIF object actions).
The GREP global variable gives the context of creation if its value is C, or the context of modification if its value is M.
It is called after creating or updating the purchase order, when the lines of the sales order are being loaded.
It is called when loading the screen of the sales order lines ([M:SOH4]), for each line, during the loading of the delivery address before loading the other fields of the line.
The order header screen ([M:SOH0]) and the other screens containing other data ([M:SOH0],[M:SOH1] and [M:SOH2]) are updated.
Use it to modify the delivery address of the line that has been loaded in a standard way with the delivery address linked to the receipt site of the purchase order line.
The delivery address of the line is stored in the WDBPAADD variable. This variable is the one that needs to be loaded in the entry point.
Available variables and masks
- The masks of the POH object are online and loaded with the purchase order currently being processed.
- The NOLPOH-1 variable contains the number of the current line of the purchase order.
- The masks of the SOH object are online. They are loaded from the purchase order and completed with a screen class as complete as it would be in interactive sales order management just before the update.
- The NLIG variable contains the number of the current line of the sales order.
- The variables used by GOBJET are loaded. As a result, GREP is set to C or M.
Open tables
In the table below, the significant content column 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 contains the lines.
The open tables are the tables opened by the purchase order object and the sales order object.
| Table | Significant content | Table title |
|---|---|---|
|
SORDER |
No |
Order headers |
|
SORDERQ |
No |
Order line quantities |
|
SORDERP |
No |
Order line prices |
|
BPARTNER |
Yes |
Business partner |
|
BPCUSTOMER |
Yes: Creation No: Modification |
Customers |
|
BPDLVCUST |
Yes |
Ship-to customers |
|
ITMMASTER |
No: Creation Yes: Modification |
Products |
|
ITMSALES |
No: Creation Yes: Modification |
Products-sales |
|
ITMBPC |
No |
Products-customer |
|
ITMFACILIT |
No |
Products-site |
|
TABSOHTYP |
Yes: Creation No: Modification |
Order types |
|
FACILITY |
No |
Sites |
|
TABCUR |
No |
Currency table |
|
SPRICLINK |
No |
Sales price list search (link) |
|
PRICSTRUCT |
No |
Price list structure |
|
SALESREP |
No |
Sales rep |
|
ITMBPS |
No |
Product-supplier |
|
TABCOUAFF |
No |
Sequence number table |
|
SPRICLIST |
No |
Customer price lists |
|
COMPANY |
Yes: Creation No: Modification |
Company |
|
PORDER |
Yes: Creation No: Modification |
Purchase order header |
MAJDEMDLVDAT: Modification of requested delivery date
Use this entry point in a multi-company context to intervene during the automatic modification of a sales order performed during the modification of a purchase order.
Use it to take control during the modification of the requested delivery date in the order lines.
This entry point is called in the purchase order management when modifying a sales order from the purchase order.
Context and operating mode
Transaction
There is one transaction in progress.
The GOK variable is used and tested and is equal to 1. Set the GOK to 0 if the transaction is to be abandoned.
Log file
There is an open log file.
Call context
This entry point is called from the management of an inter-company purchase order if there is an automatic generation of the sales order. It is called when modifying the purchase order (in the MODIF object action).
The GREP global variable gives the context of modification if its value is M.
It is called after the purchase order is updated, when the sales order lines are loaded, during the modification of the sales order lines ([M:SOH4]) from the purchase order lines ([M:POH2]) that have been modified.
It is called during the loading of the requested delivery date from the receipt date line of the purchase order.
Set the GPE variable to 1 to short-circuit this loading and modify the [M:SOH4]DDEMDLVDAT (nolign-1) field to load the date systematically.
Available variables and masks
- The masks of the POH object are online and loaded with the purchase order currently being processed.
- The NOLPOH-1 variable contains the number of the current line of the purchase order.
- The masks of the SOH object are online and loaded with the sales order. The sales order header is modified with the changes made in the purchase order header.
- The NLIG variable contains the number of the current line of the sales order.
- The variables used by GOBJET are loaded. As a result, GREP is set to M.
Open tables
In the table below, the significant content column 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 contains the lines.
The open tables are the tables opened by the purchase order object and the sales order object.
| Table | Significant content | Table title |
|---|---|---|
|
SORDER |
No |
Order headers |
|
SORDERQ |
No |
Order line quantities |
|
SORDERP |
No |
Order line prices |
|
BPARTNER |
Yes |
Business partner |
|
BPCUSTOMER |
Yes: creation No: modification |
Customers |
|
BPDLVCUST |
Yes |
Ship-to customers |
|
ITMMASTER |
No: creation Yes: modification |
Products |
|
ITMSALES |
No: creation Yes: modification |
Products-sales |
|
ITMBPC |
No |
Products-customer |
|
ITMFACILIT |
No |
Products-site |
|
TABSOHTYP |
Yes: creation No: modification |
Order types |
|
FACILITY |
No |
Sites |
|
TABCUR |
No |
Currency table |
|
SPRICLINK |
No |
Sales price list search (link) |
|
PRICSTRUCT |
No |
Price list structure |
|
SALESREP |
No |
Sales rep |
|
ITMBPS |
No |
Product-supplier |
|
TABCOUAFF |
No |
Sequence number table |
|
SPRICLIST |
No |
Customer price lists |
|
COMPANY |
Yes: creation No: modification |
Company |
|
PORDER |
Yes: creation No: modification |
Purchase order header |
ITMSTACTL: Deactivate product status control
Context and operating method
Transaction
There is no transaction in progress.
Log file
No trace file is open.
Code context
This entry point is located in this script during product control (C_ITMREF).
Use it to deactivate control regarding product status ([F:ITM]ITMSTA <> 1 & [F:ITM]ITMSTA <> 3).
Set the GPE variable to 1.
Available variables and masks
- LORICOD: Origin
If LORICOD =1, the origin is an inter-company or intersite purchase order coming from a Purchase order (GESPOH), Buyer plan (GESPOI), or Purchase open order (GESPOC).
- The GPE global variable is set to 0. You can change its value to deactivate the control.
- The GFONC1 global variable contains the function code from which the process is called: GESPOH, GESPOI or GESPOC.
- GESPOH: All masks regarding the OPOH window are opened.
- GESPOI: All masks regarding the OPOI window are opened.
- GESPOC: All masks regarding the OPOC window are opened.
Open tables
In the table below, the significant content column indicates that the content is in phase with the context (the current customer is loaded).
| Table | Significant content | Table title |
|---|---|---|
| ITMMASTER | Yes | Product |