M3 Business Engine Administrator's Guide for Purchase Order Batch Entry
This document describes the required settings in order to run Purchase Order Batch Entry (POBE) in M3.
Before you start
These prerequisites must be completed before you can run 'Purchase Order Batch Entry':
- Create number series
These number series must exist in 'Number Series. Open' (CRS165) (blank division) in order to run 'Purchase Order Batch Entry':
- Purchase orders: 'Number series type' (NBTY) = '20' with a 'Number series' (NBID). NBID can be set to any value. Several number series with NBTY= '20' can exist.
- Message number: 'Number series type' (NBTY) = 'PE' and 'Number series' (NBID) = '1'.
- Detailed message log: 'Number series type' (NBTY) = '44' and 'Number series' (NBID) = 'D'.
- Activate application messages
The application message '175= Errors detected during POBE' needs to be activated. This is done in (CRS424/E). If application message '175' is missing in 'Settings - Application Messages' (CRS424), press F14 in (CRS424/B). The application message '175' will when automatically be created.
Note: Make sure the user has a record in 'Email Address. Open' (CRS111) in order to receive emails when errors are detected in the POBE. - Purchase order batch origin
At least one PO batch origin (BAOR) must exist in 'Purchase Order Batch Origin. Open' (PPS090) to run POBE with one of the these parameters:
- 10 no series
Enter the 'Number series' (NBID) that is used for the purchase orders created through this 'PO batch origin'. The 'Number series type' (NBTY) '20' with the chosen 'Number series' (NBID) needs to exist in (CRS165) (blank division).
- 20 auto level
The valid alternatives are:
1 = Order entry, means that the purchase orders created through the POBE in the interface (PPS370) will stop in status 20 and wait for manual processing of the records.
2 = Process, means that the purchase orders created through the POBE in the interface (PPS370) is automatically processed to status 90 if no errors are found.
- 30 process method
This parameter is only valid if auto level = 2 (Process).
The valid alternative is:
1 = Batch job, a job is submitted for the processing of records entered through MI program (PPS370MI) or manually in the interface 'Purchase Order Patch. Open' (PPS370).
(One more alternative 'Auto job' might be added in the future)
- 40 deletion method
The valid alternatives are:
1 = Raise status, status is raised to 90 on record when it is completed.
2 = Delete record, record is deleted when it is completed.
- 50 existing POThe valid alternatives are:
- 0 = PO batch entry not allowed for existing PO. It means that POBE cannot be used to add data to existing PO or delete an existing PO line.
- 1 = Allow PO batch entry for existing PO. It means that POBE can be used to add data to existing PO or delete an existing PO line.
- 10 no series
Description
PPS370MI is the main input program for 'Purchase order batch entry'. The other possibility is to manually add records in (PPS370) and 'Purchase Order Patch. Open Lines' (PPS371) up to 'Purchase Order Patch. Connect Text' (PPS376).
Empty fields are filled with default values. If a field has '?' as a value, the program sets this field to blank/zero regardless of default values.
Limitations
You can use only the order category 20 (normal PO) in the first version of POBE.
The header of the existing PO is not editable with POBE.
You can use POBE only to delete an existing PO line and not specific PO line data, such as accounting, addresses, charges, or text.
Available options in different statuses
These statuses are used in the POBE:
- 10= Order entry in progress
- 20= Order entry finished
- 23= Error during pre validation (Error in validation process)
- 25= Pre validated
- 90= Transferred, no errors
It is possible to edit the data manually in the interface tables through interface programs PPS370-376 if status is below 90 = 'Transferred'. The updated data will then be used in the continuing process. If a record with status 25 is changed the status is lowered to 20. The MI-transactions can only change and update a PO in the interface if the status is 10='Order entry in progress'.
The table lists the available options in different POBE statuses:
Status: Options: |
10 | 20 | 23 | 25 | 90 |
---|---|---|---|---|---|
Create in PPS370/371 | x | - | - | - | - |
Create via MI-program | x | - | - | - | - |
Change in PPS370/371 | x | x | x | x | - |
Change via MI-program | - | - | - | - | - |
Copy | - | - | - | - | - |
Delete in PPS370/371 | x | x | x | x | x |
Delete via MI-program 'Delete Entry' (Deletes entire MSGN) | x | - | - | - | - |
PPS370 Option 20=Finish Entry | x | - | - | - | - |
PPS370/371 Option 25=Validate | - | x | x | x | - |
PPS370 Option 30=Process | - | x | x | x | - |
'Purchase Order Batch Origin. Exceptions' (PPS091)
(PPS091) makes it possible to have special parameter settings for a certain 'Supplier'.
'Purchase Cost. Connect Supplier Costing Element' (PPS288)
In (PPS370) and PPS370MI it is possible to update values from external system for purchase costing elements connected to the purchase order head or -lines displayed in (PPS215). These values are used in the purchase order processing and invoice matching.
In order to get the integration between the external system and M3 to work regarding updates of costing elements on a PO or a PO-line a setup in (PPS288) is required. A supplier costing element should be defined for handling cost updates sent from suppliers i.e. charges, handling costs etc. This supplier costing element is then connected to a purchase costing element in M3, defined in 'Costing Element. Open' (PPS280).
Costing elements in M3 connected to supplier costing elements requires that distribution method (DIMT) in (PPS280/E) is set to 1 = 'Line-unique expenditures' or 2 ='Header-unique expenditure, should not be distributed'. Method 3 = "Distribute between header and lines" can not be used in current version of POBE.
The currency code used for the values entered in 'Purchase Order Batch. Connect Charges' (PPS375) is always equal to the currency on 'Purchase Order Batch. Open' (PPS370/E).
Transactions
These transactions are available in PPS370MI:
-
Transaction StartEntry
The purpose of StartEntry is to retrieve the 'Message number' (MSGN) and to decide if the 'Message Number' is for adding the new batch records or adding batch records that will add data to data or delete data on the existing PO.
The 'Message number' is used to group the 'PO batch information' that are sent together. In all other MI-transactions a valid 'Message number' needs to be entered.
The input fields are 'Purchase Order batch origin' (BAOR) and 'Purchase order batch entry code' (PBEC).
Output field is 'Message number' (MSGN).
-
Transaction AddHead
The purpose of 'AddHead' is to create a 'PO batch head' (MXHEAD).
The output of 'AddHead' is a 'PO number' (PUNO).
The mandatory fields are: 'Message number' (MSGN) 'Facility' (FACI), 'Warehouse' (WHLO), 'Supplier' (SUNO) and 'Req. delivery date' (DWDT).
The field 'PO head reference' (HREF) is an optional field. 'PO head reference' can in combination with 'Supplier' be used, instead of 'PO number' (PUNO), in the transactions 'AddLine', 'AddAddress', 'AddCharge', 'AddText' and 'AddAccStr'.
-
Transaction AddLine
The purpose of 'AddLine' is to create a 'PO batch line' (MXLINE).
The output of 'AddLine' is a 'PO line' (PNLI) on a 'PO number' (PUNO).
It also exists a possibility to directly create both a 'PO batch head' (MXHEAD) and a 'PO batch line (MXLINE) through 'Addline'.
Use these examples to fill in 'Addline' details:
-
Create line using PO number
This case will create a 'PO batch line' (MXLINE) to an existing 'PO batch head' (MXHEAD).
The transactions 'StartEntry' and 'AddHead' must have been run in order to have a valid 'Message number' (MSGN) and 'PO number' (PUNO).
Mandatory fields are: 'Message number' (MSGN), 'PO number' (PUNO), 'Item no' (ITNO) and 'Ordered qty' (ORQA).
The fields 'Facility' (FACI), 'Warehouse' (WHLO), 'Supplier' (SUNO) and 'Requested delivery date' (DWDT) should be left blank.
The field 'PO line' (PNLI) is an optional field. If 'PO line' is left blank/zero, it will automatically be fetched.
The field 'PO line reference' (LREF) is an optional field. 'PO line reference' can in combination with 'Supplier' (SUNO) and 'PO head reference' (HREF) be used in the transactions 'AddAddress', 'AddCharge', 'AddText' and 'AddAccStr' instead of 'PO line' (PNLI).
-
Create line using PO head reference
This case will create a 'PO batch line' (MXLINE) to an existing 'PO batch head' (MXHEAD).
The transactions 'StartEntry' and 'AddHead' must have been run in order to have a valid 'Message number' (MSGN) and 'PO head reference' (HREF).
Mandatory fields are: 'Message number' (MSGN), 'PO head reference' (HREF), 'Item no' (ITNO) and 'Ordered qty' (ORQA). The fields 'Facility' (FACI), 'Warehouse' (WHLO), 'Supplier' (SUNO) and 'Requested delivery date' (DWDT) should be left blank.
The field 'PO line' (PNLI) is an optional field. If 'PO line' is left blank/zero, it will automatically be fetched.
The field 'PO line reference' (LREF) is an optional field. 'PO line reference' can in combination with 'Supplier' (SUNO) and 'PO head reference' (HREF) be used in the transactions 'AddAddress', 'AddCharge', 'AddText' and 'AddAccStr' instead of 'PO line' (PNLI).
-
Create head and line
This case will create a 'PO batch line' (MXHEAD) and a 'PO batch line' (MXLINE).
A valid 'Message number' (MSGN) must exist ('StartEntry').
Mandatory fields are: 'Message number' (MSGN), 'Facility' (FACI), 'Warehouse' (WHLO), 'Supplier' (SUNO), 'Requested delivery date' (DWDT), 'Item no' (ITNO) and 'Ordered qty' (ORQA).
The field 'PO head reference' (HREF) must be left blank.
The field 'PO line' (PNLI) is an optional field. If 'PO line' is left blank/zero, it will automatically be fetched.
The field 'PO line reference' (LREF) is an optional field. 'PO line reference' can in combination with 'Supplier' (SUNO) be used in the transactions 'AddAddress', 'AddCharge', 'AddText' and 'AddAccStr' instead of 'PO line' (PNLI).
-
Transaction AddCharge
The purpose of 'AddCharge' is to create a 'PO batch charge' (MXOEXP).
When a 'PO batch' is transferred to a real purchase order (MPHEAD, MPLINE etc.) the charges according to the costing model are connected to the PO-head or PO-head.
When transferred to M3 the 'PO batch charge' (MXOEXP) will update or create the 'PO charge' (MPOEXP).
-
Create line using PO number
Work in progress flag
There is a 'work in progress' flag and a 'job number' on the purchase order head in the interface (MXHEAD). Function programs will always check these fields before performing any operations on a PO in the interface to make sure that there is not some other job currently working on the batch order. The values of the 'work in progress' flag are:
- 0 = Not in progress
- 1 = Finish entry in progress
- 2 = Update in progress
- 4 = Delete in progress
- 8 = Validate in progress
- 9 = Transfer in progress
Reset-scenarios
The listed scenarios describe some typical settings in POBE.
-
Rollback of entry
Some orders have been entered through PPS370MI. FinishEntry has not been called yet. For some reason you wish to regret the entire input and perform a rollback on entire entry.
Solution:
Send MI-transaction "DeleteEntry XXXXX". Everything on that entry is deleted. Check Inquiry Type 4 before and after in (PPS370).
-
Continue FinishEntry after system crash (or dump)
System is crashing during ongoing FinishEntry. No answer is received if transaction has finished or not. Did all orders get status 20 and were sent for further processing?
Solution:
Re-run FinishEntry when system is up running again: "FinishEntry XXXXX". Either we get the answer transaction ready or automatic reset is performed on the entry and FinishEntry is run again. Check Inquiry type 4 and 5 before and after.
-
Continue processing after system crash (or dump)
FinishEntry ready but system crashed while the entry is being processed further.
Solution:
Continue processing the entry by using Inquiry Type 5 and option "35 - PO Batch Selection" --> (PPS378). All orders that are not already processed is processed. Any locked orders are automatically reset first (not finished orders in MPHEAD will then be roll-backed). Check (PPS370) Inquiry Type 4 and 5 as well as (PPS200) before and after.
-
Reset single order after system crash (or dump)
A single order can be locked on many places in the process after a system crash (status 10, 20, 23, 25, 90).
Solution:
Reset the order to status 20 (or 10) by using option "40 Reset" (not fully created order in MPHEAD is then rolled back). Check (PPS370) Inquiry Type 1, 5 and (PPS200) before and after.