Skip to main content

SYSPRO Posting Patterns

Overview

This document describes the patterns and best practices for posting transactions to SYSPRO through business objects, specifically focusing on purchase order creation through the PORTOI business object.

PORTOI Business Object

Purpose

Creates purchase orders in SYSPRO with full validation and business rule enforcement.

XML Structure

Input XML format:

<PostPurchaseOrders>
<Item>
<Supplier>SUP001</Supplier>
<Warehouse>WH01</Warehouse>
<OrderDate>2024-01-15</OrderDate>
<DueDate>2024-02-15</DueDate>
<StockLines>
<StockLine>
<StockCode>ITEM001</StockCode>
<OrderQty>100</OrderQty>
<Price>10.50</Price>
</StockLine>
</StockLines>
</Item>
</PostPurchaseOrders>

Parameter XML:

<PostPurchaseOrders>
<Parameters>
<ValidateOnly>N</ValidateOnly>
<IgnoreWarnings>N</IgnoreWarnings>
<ApplyIfEntireDocumentValid>Y</ApplyIfEntireDocumentValid>
</Parameters>
</PostPurchaseOrders>

Posting Workflow

Pre-Validation

  1. Validate supplier is active
  2. Check stock items exist
  3. Verify warehouse validity
  4. Confirm user permissions

Posting Process

  1. Generate XML documents
  2. Validate SYSPRO session
  3. Submit to business object
  4. Parse response for errors
  5. Extract generated order number

Error Handling

Common errors and handling:

  • Supplier on hold: Notify user, skip order
  • Stock not found: Log error, continue with valid items
  • Insufficient privileges: Show permission error
  • Locked records: Implement retry mechanism

Transaction Management

Batch Processing

  • Group orders by supplier
  • Use transaction boundaries
  • Implement partial success handling
  • Log all transactions for audit

Rollback Strategies

  • Track posted orders for reversal
  • Implement compensation transactions
  • Maintain posting status tracking

Best Practices

  • Always validate before posting
  • Use structured error handling
  • Log all XML for debugging
  • Implement idempotency checks
  • Handle partial success scenarios