PurchaseTypes - methods
Create
Driver Type : SASI
Use this method to create a purchase type. If the purchase type already exists, an error message is produced and the payload is rejected.
CreateOrAmend
Driver Type : SASI
This method creates a purchase type if it does not exist already and amends it if it does. Whereas the Create and Amend methods depend on you to know whether the data does or does not exist in advance, this method can be used if you are unsure.
Note: Do not include Stage data in the payload for this method if there are existing Stage records for the transaction type. The update/insert of Stage records is prevented if any Stage data already exists. In this case, Stage records must be created/amended via SunSystems.
CreateReplaceOrDelete
Driver Type: SASI
Use this method to synchronize purchase types. The purchase type is created if it does not exist already and replaced if it does. If the purchase type does not exist in the originating business unit, it is deleted.
Delete
Driver Type : SASI
Use this method to delete purchase types.
DeleteChildData
Driver Type : SASI
This method deletes child data (PO Assign Preset, PI Assign Preset, PO Analysis, Value, Stage) but retains the parent record (Purchase Type).
It is also possible to delete 'grandchild' data. The deletion of child and grandchild data is controlled by a <DeletionFlag> node at child level. If the flag is set to Y, both child and grandchild is deleted. Otherwise, the child data is retained.
For example, the <Stage> node contains child data, and the <LedgerIFReversal> node contains grandchild data. The <DeletionFlag> node is set to Y, so the <LedgerInterfaceDefinitionCode> data is deleted first, followed by the <Stage> data:
<PurchaseTypes> <PurchaseTypes.PurchaseTransactionType>PUR</PurchaseTypes.PurchaseTransactionType> <Stage> <Stage>0</Stage> <DeletionFlag> <DeleteStageAfterLIReversalDeleted>Y</DeleteStageAfterLIReversalDeleted> </DeletionFlag> <LedgerIFReversal> <LedgerInterfaceDefinitionCode>LIDEF</LedgerInterfaceDefinitionCode> </LedgerIFReversal> </Stage> </PurchaseTypes>
Query
Driver Type : Export
Use this method to obtain purchase type details or to extract purchase types data from SunSystems.