GaryEd
1st May 2013, 21:11
Can anyone explain what this session actually does?

(this is for baan IVc4)

abattoir
1st May 2013, 23:16
Hi Gary,
I have attached the copy of logic present in code for this session....
|* IMPORTANT :This session should be run only once for particular set of records
|*
|* LOGIC OF CORRECTION PROGRAM:
|*
|* Before the solution 70971 ( DF 79168 ), during Release Outbound data on
|* multiple orders ( with atleast one ship complete order ), double entry has
|* taken place for tdinv700 for the last line of ship complete order. After that
|* customer has made cycle counting order to correct the inventory. But, the
|* wrong entry in the tdinv700 table has resulted in wrong calculation during
|* MPS run, because the MPS at present does not take records of type warehouse
|* order.
|*
|* This correction program is written to correct the entries in the tdinv700
|* table so that MPS gives correct result.
|*
|* At present the records in tdinv700 in the customer system is as follows for
|* example:
|*
|* Order Type Seq.No Qty Qty after Transaction
|*
|* 1 Sales Delivery 1 10 100133 ........Correct one
|* 2 Sales Delivery 2 10 100123 ........Incorrect entry
|* 3 WH Order 0 10 100133 ........Due to cycle counting
|*
|* Then,the additional records that are added in tdinv700 by this correction
|* program are:
|*
|* 1 Sales Delivery 3 -10 100133
|* 2 WH Oder 4 -10 100123
|*
|* Record 1: Copy of Sequence number 1 with sequence number increased by 1
|* and quantity multiplied by -1 and inventory after transaction
|* must be increase by that quantity.
|* Record 2: Copy of Sequence number 1 with sequence number increased by 2;
|* transaction = inventory adjustment; order type = warehouse order
|* and order number is determined based on first free number for
|* cycle count orders; postion number =1 and relation = empty and
|* quantity multiplied by -1 and inventory after transaction is the
|* same as sequence number 1.
|*
|******************************************************************************

GaryEd
1st May 2013, 23:33
Thanks. trying to deal with the corrupted tdinv700 situation that seems so common and came across this session and wondered if it applied. Does not seem that it does for our case.