PurchaseOrder
This component allows you set up and maintain purchase orders and runs the Purchase Order Entry (POE) function.
This component also provides various methods that allow you to progress purchase orders through certain stages. If doing so, you must ensure that purchase orders are at the correct stage in order to be processed.
Depending on how your purchase type stages have been set up, some component methods may not be relevant.
There are three ways to improve performance of purchase order imports:
- Restricting the payload - the payload definition for purchase orders is composed of all data items that are used within order fulfillment. As your SunSystems installation may not use all available data items, you can reduce the time taken to process purchase orders by ensuring that your payloads only include those data items that you wish to work with.
- Reduce the number of processing options in SunSystems. If you are importing Purchase Orders from an external application you can set up a particular purchase type that does not carry out the various calculations, validations and lookups that would normally happen. For example, you might ensure that budget checking and inventory allocation do not occur at order entry. These can significantly increase the time taken to process a given Purchase Order.
- Ensure that line numbers are in numerical order as disordered line numbers will impact
performance. If both the User Line Number
(
PurchaseOrder.PurchaseOrderLine.UserLineNumber
) and the System Line Number (PurchaseOrder.PurchaseOrderLine.LineNumber
) are provided, then User Line Number is used.
We do not support the import of Purchase Orders using a 'Start of Document', 'Line' or 'End of Document' preset type. 'Start of Document' and 'Line' preset types can cause inconsistency in the line numbers. For example, when importing a new Purchase Order using a 'Start of Document' preset type, the order is created with a preset line, then imported into a Purchase Type that also creates a preset line.
Creating new orders line using the 'End of Document' preset type will not work, because an empty line is required to insert the new lines information. However, the empty line is not present if this preset type has been used.
Methods
PurchaseOrder.FlagOptions.BudgetOverrideFlag
) controls the response to
the budget override message, which occurs when budget checking fails. Values are 1 (Yes) or
0 (No). It can be used in any method where a budget override message may occur. For example,
if the budget override message occurs during the entry stage, a response of 1, or Yes,
overrides the message. A response of 0, or No, results in the lines being held. If the
budget override message occurs during the confirm stage, a response of 1 results in
completion whereas a response of 0 results in the rejection.- Approve
- Driver Type: SASI
- ConfirmLineOrder
- Driver Type: SASI
- CreateOrAmend
- Driver Type: SASI
- DeleteLineOrder
- Driver Type: SASI
- DeleteLines
- Driver Type: SASI
- DeleteWholeOrder
- Driver Type: SASI
- HoldLineOrder
- Driver Type: SASI
- ReleaseLineOrder
- Driver Type: SASI
- Query
- Driver Type: Export
Mandatory fields
As purchase orders can be tailored to suit customer needs, there are no fields that are always mandatory. The minimum amount of data required for entering purchase orders is very small. However, you should bear in mind that the actual amount needed to create meaningful orders and to progress those orders is much larger. This is wholly dependent on how your system is configured.
As a guide, you may find that the following need to be supplied:
- Purchase Transaction Type - payload element
<PurchaseTransactionType>
- Purchase Order Reference - payload element
<PurchaseOrderReference>
- Either User Line Number - payload element
<UserLineNumber>
or Line Number - payload element<LineNumber>
- Item Code - payload element
<ItemCode>
.
See individual methods for specific field requirements.
Examples of the Approve Method
The following example is used to unapprove all lines on the purchase order:
<PurchaseOrder>
<PurchaseOrderReference>PO/002104</PurchaseOrderReference>
<Approval>
<Unapprove>Y</Unapprove>
<ReasonCode>DAMAGED</ReasonCode>
</Approval>
</PurchaseOrder>
The following example is used to unapprove line 1 and Approve lines 2 and 3 on the purchase order:
<PurchaseOrder>
<PurchaseOrderReference>PO/002104</PurchaseOrderReference>
<PurchaseOrderLine>LineNumber>1</LineNumber>
<Approval>
<Unapprove>Y</Unapprove>
<ReasonCode>DAMAGED</ReasonCode>
</Approval>
</PurchaseOrderLine>
<PurchaseOrderLine>
<LineNumber>2</LineNumber>
<Approval>
<Unapprove>N</Unapprove>
<ReasonCode>DAMAGED</ReasonCode>
</Approval>
</PurchaseOrderLine>
<PurchaseOrderLine>
<LineNumber>3</LineNumber>
</PurchaseOrderLine>
</PurchaseOrder>
Related data
- Stage
- Item Characteristics
- Analysis Quantity 1-10
- Approval Stamp
- Consumed Budget
- Value Labels 1-50
- Temporary Address
- Purchase Order Standard Text
- Purchase Order Line Standard Text.