How to maintain Order Integrity between SD/OD and ST/OT

Purpose of Document

This note provides a technical review on the integrity between Sales and Purchasing and how to maintain order integrity between SD/OD and ST/OT.

Note that this document is written based on EnterpriseOne application release 9.1

Below tables are to show how F4211 (as representation of Sales) and F4311 (as representation of Procurement) are added/inserted through Master Business Functions. F4311 Integrity is handled by Table Trigger in F4211 (Sales Order Detal File) whereas integrity from Procurement is handled by N4002540 (F4211DirectShipIntegrity and F4211DirectShipIntegrityReceipts). Note that a Business Function F4211GetShipmentInfo (B4200920) can be called to get Shipment Information (in F4211) or to Update F4211.

Add SD/OD and/or ST/OT (Sales -> Procurement)

Case study in W4210A - [Order Detail]

Source Module & Description Purpose & comments
Set Focus on Grid in W4210A - [Sales Order Detail] Header/Detail Form
B4200310 F4211FSBeginDoc Validate Sales Order Header and Create Sales Order Cache/Work Files (F42UI01, F42UI02) which is to be used in Edit Doc and End Doc routine
Row Exit & Changed - Asynch in W4210A
B4200311 F4211FSEditLine Validate Sales Order Detail and Create Sales Order Detail Cache/Work File (F42UI11, F42UI12) which is to be used in Edit Doc and EndDoc routine
B4202510 CalcSOMBFPricesBeforeProcurement Assign how to compute PRRC in populating PO Detail Cache. If it is a Direct Ship line and cost override is true, then populate the PO price with the appropriate cost. Note that the Purchasing Unit Price is always computed based on Purchasing UOM in Item Master
X4311Z2 F4311EditLine Validate Purchase Order Detail Information and create cache (F4311Z) for Purchase Order Detail
X4311Z1 F4311FSBeginDoc Validate Purchase Order Header Information and crate cache (F4301Z) for Purchase Order Header
B4202510 CalcSOMBFPricesAfterProcurement To set/determine how to set Sales Cost based on Purchasing Unit Price
OK button clicked event in W4210A
B4200312 F4211EditDoc Check whether header and detail caches are NULL or not and if not validate it order level information
Post OK button clicked event in W4210A
B4200310 F4211FSEndDoc Commit Header and Detail Cache/Work File to Database. Order level validation can take place (for example, Credit Check)
Transaction Processing ON (MANUAL COMMIT)
(Insert F4211)
B4301250 F4311ZUpdateRelatedOrderInfo To update PO detail cache with Related Order Information (because we have followed usual routine to create Purchase Ordr by calling the Business Function CacheProcessPODetailCache with Cache Action Code 7 - To Update it
XT4311Z1 F4311EndDoc Commit Purchase Order Header and Detail Cache into Database
(Insert F4311) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
XT4311Z1 F4311ClearWorkFiles Clear caches used during Purchase Order Creation
B4200310 F4211ClearWorkFile Clear caches used during Sales Order Creation

Note:

Update SD and/or ST (Sales -> Procurement)

Case Study in W4205K - [Shipment Confirmation]

Source Module & Description Purpose & comments
Row Exit & Changed - Asynch even in W4205K - [Shipment Confirmation]
N4200790 F42UI05EditLine Validate Ship confirmation detail lines and create cache by calling LoadOrUnloadShipConfirmCache (B4200810)
B4200810 LoadOrUnloadShipConfirmCache Create Cache when it gets called by Edit Line routine, whereas it reads cache in End Doc routine
XT4111Z1 F4111EditLine Create Inventory Transaction Cache (F41UI001) to deal with F4111 (Item Ledger)
B4200810 LoadOrUnloadShipConfirmCache Update Ship Confirm Cache
Post OK button clicked in W4205K
B4200810 LoadOrUnloadShipConfirmCache To get cache created through Edit Line routine to make use of in calling End Doc
Post OK button clicked in W4205K
N4200790 ShipConfirmEndDoc Commit Shipment Cache to DB
Transaction Processing (MANUAL COMMIT)
B4200810 LoadOrUnloadShipConfirmHdrCache Read all caches created during Edit Line routine which is to be used in calling F4211GetShipmentInfo
B4200920 F4211GetShipmentInfo The purpose of this function is to get or update all the information from the SO Detail (F4211) needed to process a ship confirm.
(Update F4211)
Table Trigger in F4211 (Sales Order Detail File)
B4201310 F4311OrderIntegrity This function maintains integrity between Sales and Purchase when modification/update is done from Sales side
XT4311Z2 F4311EditLine Validate Purchase Order detail line based on value changed in Sales side and create cache for purchase order detail
XT4311Z1 F4311FSBeginDoc Validate purchase order header and create cache for header
XT4311Z1 F4311EndDoc Commit caches during Edit Line and Begin Doc routine
(Update F4311) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
XT4311Z1 F4311ClearWorkFiles Clear all the caches used during update of Purchase Order
XT4111Z1 F4111EndDocument Write Cardex to record Inventory Transaction
N4200790 F42UI05DeleteCache Clear all the caches used during shipment confirmation
XT4111Z1 F4111ClearDetailStack Clear inventory transaction caches used

Note:

Performing PO Receipt:

In turning on In-trasit account (flag for cIntransit_Accounting) through processing option of P4205, you can perform receipt of related order,

P4205 - Shipment Confirmation
|--- ShipConfirmEndDoc
|--- F4211GetShipmentInfo
|--- Update Table (F4211)
|--- (Table Trigger which is calling) F4311OrderIntegrity (this is to update F4311)
(below action take places in the end - not through table trigger but direct calling of MBF for PO receipt)
|--- F4312BeginDoc, which validate/defaults receipt header
|--- F4312EditLine, which validate/defaults receipt detail
|--- F4312EditDoc: Order level validation
|--- F4312EndDoc: Commit cache created during Edit Line
|--- SetLevelPOReceiptsEndDocError which collect errors during validation
|--- ProcessErrorsToPPAT which writes work center error message
|--- F4312ClearWorkFile: release resource used during process

Note:


Update OD (Procurement -> Sales)

Case study in W4310A - [Order Detail]

Source Module & Description Purpose & comments
Set Focus on Grid event in W4310A - [Order Detail]
XT4311Z1 F4311FSBeginDoc Validate and create cache for Purchase Order Header (e.g., Supplier etc.)
Row Exit & Changed - Asynch event in W4310A
XT4311Z2 F4311EditLine Validate and create cache for Purchase Order Detail
B4302180 CacheProcessPODetailCache To store Purchase Order detail cache which is to be used for Edit Doc and End Doc routine
OK button clicked event in W4310A
XT4311Z1 F4311EditDoc This function is called after F4311EditLine has executed successfully, records have been written to the hF4311Cache, and before calling F4311EndDoc.
Edit Doc will cycle through all the records in the cache, to determine the total value of the order and if the order is above (MAXO) or below (MINO) supplier order value.
In addition this function handles the budget warning message, if requested in the P4310 processing options and any account- based line on the order exceeds the budget amount.
B4302180 CacheProcessPOHeaderCache Read Header Cache which is created during Begin Doc
B4302180 CacheProcessPODetailCache Read Detail Cache which is created during Edit Line
Post OK button clicked event in W4310A
XT4311Z1 F4311EndDoc Commit cache created during Begin Doc and Edit Line
Transaction Processing ON (MANUAL COMMIT)
B4302180 CacheProcessPODetailCache Read detail cache
(UPDATE F4311) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
N4002540 F4211DirectShipIntegrity Validate change made in OD side and update SD if needed
B4200920 F4211GetShipmentInfo To update SD based on change made in OD
(Update F4211)
XT4311Z1 F4311ClearWorkFiles Clean up caches which were used during OD update

Note:

Update OD [Receipt] (Procurement -> Sales)

Case study in W4312A - [Purchase Order Receipts]

Source Module & Description Purpose & comments
Set Focus on Grid event in W4312A - [Purchase Order Receipts]
XT4312Z1 F4312BeginDoc Validate Purchase Order Header information before proceed detail validation (e.g., Supplier and so on)
Row Exit & Changed - Asynch Event in W4312A
XT4312Z2 F4312EditLine Validate Receipt Detail and create cache (F43121Z) for that and call subroutine to handle inventory transaction and GL transaction
B0900049 F0911FSBeginDoc GL Transaction - Validate GL Header and create cache (I09UI001)
XT4111Z1 F4111EditLine Inventory Transaction - Validate and create Inventory Transaction cache (F41UI001)
B4301060 F43121ZGetReceiverCache Create Purchase Order Receipt Cache (F43121Z) which is to be used during Edit Doc and End Doc routine
B4302510 CreatePOReceiptJournalEntries Validate DMAAI depends on transaction before calling F0911FSEditLine
B0900049 F0911FSEditLine Validate GL Transaction Detail and create Cache I09UI002
XT4111Z1 F41UI001ProcessInventoryCache Store inventory transaction cache into F41UI001
OK button clicked in W4312A
XT4312Z1 F4312EditDoc Before calling End Doc validate processing option, default, check caches (if needed) handle blink landed cost and summarize G/L cache if requested
B0900049 F0911FSEditDoc Compare and validate GL header and detail cache
Post OK button clicked
B4301060 F43121ZGetReceiverCache Fetch Receipt cache created during Edit Line
XT4312Z1 F4312EndDoc To commit transaction caches created to database
Transaction Processing ON (MANUAL COMMIT)
B0900049 F0911FSEndDoc Commit GL Cache to General Ledger
XT4111Z1 F4111EndDocument Commit Inventory Transaction Cache to Item Ledger
B4100050 InventoryCardexShell Since XT4111Z1 is general master business function in handling Inventory Transaction it has a specific functions to execute
B4100040 WriteCardexRecord Write F4111 (Item Ledger)
(Update F4311) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
XF43121 POReceiptF43121Shell Functional server to handle PO receipt data
XF43121 InsertPOReceiver write F43121 because PO receipt update Purchase Order and Insert it into F43121
(Insert F43121)
B4200920 F4211GetShipmentInfo (when F4311.PS01 = 2) To get Sales Order Detail Information
N4002540 F4211DirectShipIntegrityReceipts Depends on receipt to maintain integrity with SD
B4200450 AdvancedSODetailLineSplit Create cache for Sales Order line which to be used during Sales Order Master business function routine
B4200310 F4211FSBeginDoc Validate Sales Order Header and create cache for it for Update Mode
B4200920 F4211GetShipmentInfo To get Sales Order detail information
B4200311 F4211FSEditLine Validate Sales Order detail lines based on value modified during Receipts
B4200310 F4211FSEndDoc Commit Sales Order detail cache to DB
(Update F4211)
XT4312Z1 F4312ClearWorkFile Clear caches used during Purchase Order Receipt

Note:

Clarification on work center message LM0083


This message can be issued to indicate that F4211 got updated but F4311 was not updated so Purchase Order has to be updated manually.

Data Item : LM0083
Sales Order &1 &2 &3 &4 Integrity Issue
Cause. . . . . Errors were encountered when assuring order integrity between
sales order &1 &2 &3 , line &4 and
purchase order &5 &6 &7 , line &8 .
Resolution . . Please review the following errors to determine the source of
the integrity issue. The purchase order will need to be
manually updated to maintain integrity with the sales order.


Columns to compare from Sales to Purchase through B4201310:

Description Target Source Compare? UpdatePO Assignment
mnUnitsSecondaryQty pdsqor sdsqor Yes Yes f4311.pdsqor = f4211.sdsqor
mnCarrierNumber pdancr sdcars
szModeOfTransport pdmot sdmot
szStatusCodeNext pdnxtr
(999)
sdnxtr Yes Yes F4211.NXTR = 999 AND F4311.NXTR = 999 AND LTTR = 980
szStatusCodeLast pdlttr
(980)
sdlttr 980
szLotSerialNumber pdlotn sdlotn Yes Yes
jdDateRequested pddrqj sddrqj Yes Yes
jdPromisedDeliveryDate pdpddj sdpddj Yes Yes set cPromisedDeliveryDateChanged 'Y'
jdCancelDate pdcndj sdcndj Yes f4211.cndj not NULL
mnQuantityOrdered pduorg sduorg Yes Yes
mnQuantityOpen pduopn A Yes Yes A = mnQuantityOrdered - mnQuantityCancelled
mnAddressNumberShipTo pdshan sdshan Yes Yes
szUnitOfMeasurePricing pduom3 sduom3 Yes Yes
szUnitOfMeasurePrimary pduom sduom Yes Yes
mnAmountUnitWeight pditwt sditwt Yes Yes
mnAmountUnitVolume pditbl sditbl Yes Yes
mnSOUnitPriceCostInPOCurrency pdprrc sduprc prrc
nSTPriceChanged Yes When ST Price has changed

Note:

Columns to compare from Purchase to Sales:

Description Target Source Compare? UpdateSO Assignment
mnUnitsSecondaryQty sdsqor pdsqor Yes Yes Only when f4211.nxtr < 900
jdPromisedDeliveryDate sdrsdj pdrsdj Yes Yes
szLot sdlotn pdlotn Yes Yes
mnUnitCost sduncs pdprrc Yes Yes
szStatusCodeNext sdnxtr Receipt
szStatusCodeLast sdlttr based on Sales Order Activity Rule
szStatusCodeNext sdnxtr Cancelled Set 999 if Purchase Order is Cancelled
szStatusCodeLast sdlttr Set 980 if Purchase Order is Cancelled
mnQuantityCancelled sdsocn When Purchase Order is Cancelled, set socn = socn + soqs
jdActualShipDate sdaddj only when this is not updated through shipment confirmation

Note:


Refer to <Document 1438174.1> E1: 40: Columns Mapped in Purchase Order Generation from Sales Order to verify columns in Purchase Order which are inherited from Sales Order.

This note is written based on EnterpriseOne application release 9.1