Order Entry Backorder by Area by Product by Customer

Purpose To show sales area representatives what customers are affected by products on back order.
Sample  
Selections       R E P O R T    S E L E C T I O N
╔═══════════════════════════════════════════╗
║                                           ║
║ From Product                              ║
║ To   Product                              ║
║                                           ║
║ From Product Group                        ║
║ To   Product Group                        ║
║                                           ║
║ From Sales Area                           ║
║ To   Sales Area                           ║
║                                           ║
╚═══════════════════════════════════════════╝
Sort Seq Sales Area ; Product (Stock) Code ; Customer ; Branch ; Order Id
Filters Orders (not invoices or quotes) ; Normal (not standing or template)
Complete and Incomplete (not historic); Quantity on back order > 0
Group by Area ; Product (with subtotals)
Run from Alternative reports in OE, SI
Code OEREPBKO
Backorder = Quantity on order less qty supplied this packing slip less quantity previously invoiced
Equivalent Nearest match in standard reports is Order Reports in Stock Sequence
Complexity Medium
Code snip                                E D I T B O D Y
│ ┌─TRAVERSE InvoiceLineFile BY InvoiceLineFile.StockBranOrdKey────────────────┐
│ │ PROGRESS "Building key " + InvoiceLineFile.StockCode + InvoiceLineFile.Branc
│ │ ┌─IF InvoiceLineFile.QuantityOrdered - InvoiceLineFile.QuantitySupplied - In
│ │ │ ┌─IF (BLANK(FromProduct) OR (FromProduct >= InvoiceLineFile.StockCode)) AN
│ │ │ │ ┌─IF (BLANK(FromProdGroup) OR (FromProdGroup >= InvoiceLineFile.ProductG
│ │ │ │ │ ┌─IF SEEK(ARCustomerFile,InvoiceLineFile.CustomerPointer)────────────┐
│ │ │ │ │ │ ┌─IF (BLANK(FromRep ) OR (FromRep >= ARCustomerFile.SalesAreaCode)) 
│ │ │ │ │ │ │ ┌─IF SEEK(InvoiceHeadFile,InvoiceLineFile.ParentRecordPtr)───────┐
│ │ │ │ │ │ │ │ ┌─IF (InvoiceHeadFile.Status = "C" OR InvoiceHeadFile.Status =  
│ │ │ │ │ │ │ │ │ ADDKEY(LineAreaKey,ARCustomerFile.SalesAreaCode + InvoiceLineF
│ │ │ │ │ │ │ │ └───────────────────────────────────────────────────────────────
│ │ │ │ │ │ │ └────────────────────────────────────────────────────────────────┘
│ │ │ │ │ │ └───────────────────────────────────────────────────────────────────
│ │ │ │ │ ├─ELSE ─┤                                                             
│ │ │ │ │ │ ADDKEY(LineAreaKey,"ZZZZ" + InvoiceLineFile.StockCode + InvoiceLi   
│ │ │ │ │ └────────────────────────────────────────────────────────────────────┘
│ │ │ │ └───────────────────────────────────────────────────────────────────────
│ │ │ └─────────────────────────────────────────────────────────────────────────
│ │ └───────────────────────────────────────────────────────────────────────────
│ └────────────────────────────────────────────────────────────────────────────┘
│ ╔═PAGEHEADER════╗                                                            │
│ ║ OUTPUT HEADER ║                                                            │
│ ╚═══════════════╝                                                            │
Release date 22 Nov 2001