Yes, Tom this is a tricky process for sure. Dealing with External tables makes it even harder to develop I think!
I am starting the process from a menu items right now.
I just ran it again and this time it completed without any issues.
I took out the 2nd to last process call that reads the special pricing agreement BO.
The last process which creates the actual records, created 75 records this time without failing or running out of memory (Java Heap Space error)
The special pricing process is the last process that is called from the process that does a FIND on the temp table with my working dataset.
Basically it is layed out this way:
FIND ALL T_AVX_Sales_Ledger IN BATCHES OF 1 (There are 75 records in the temp table)
Read_apinv_line (called process) This process calls a process to Read apinv_hdr
Find Lowest SPA Price ( called process)
Within This process it calls up 6 other processes to look for the lowest Special pricing agreement for the partno.
Once it finds a match it sets a FoundFlag to Yes and does not call the rest of the processes
It then returns to the top level process and calls the final process to read the temp table for the last time and creates a record for each one in the actual AVX_SalesLedger BO.
When calling the Find_Lowest_SPA_Price process I get the "Updated by another user error on the other temp BO"
"Find_Lowset_SPA_Price" process looks like this: Passing in T_AVX_Sales_Ledger & T_SalesLedgerDateRange
Rule 1 Find_Lowest_SPA_Price1
Rule 2 If T_SalesLedgerDateRange.T_SPANumFound='No' Then
G_Find_Lowest_SPA_Price2
Rule 3 If T_SalesLedgerDateRange.T_SPANumFound='No' Then
G_Find_Lowest_SPA_Price3
Rule 4 If T_SalesLedgerDateRange.T_SPANumFound='No' Then
G_Find_Lowest_SPA_Price4
Rule 5 If T_SalesLedgerDateRange.T_SPANumFound='No' Then
G_Find_Lowest_SPA_Price5
Rule 6 If T_SalesLedgerDateRange.T_SPANumFound='No' Then
G_Find_Lowest_SPA_Price6
Each one of the above processes looks likes this with the exception of the SPA.Cust_PartNo_Item field. we are trying to find the matching part number that is in the Special Pricing Agreement Table and it could be 1 of 3 PartNo variations.
Passing in T_AVX_Sales_Ledger & T_SalesLedgerDateRange
SPA_Price1. AVX_SPA.CustPartNo_Item=T_AVX_Sales_Ledger.SalesItemID
SPA_Price2. AVX_SPA.AVX_CustPartNo_Desc=T_AVX_Sales_Ledger.SalesItemID
SPA_Price3. AVX_SPA.AVX_Catelog_CustPartNo=T_AVX_Sales_Ledger.SalesItemID
SPA_Price4. AVX_SPA.CustPartNo_Item=T_AVX_Sales_Ledger.SalesItem_Desc
SPA_Price5. AVX_SPA.AVX_CustPartNo_Desc=T_AVX_Sales_Ledger.SalesItem_Desc
SPA_Price6. AVX_SPA.AVX_Catelog_CustPartNo=T_AVX_Sales_Ledger.SalesItem_Desc
Rule 1 FIND AVX_SPA WHERE AVX_SPA.CustPartNo_Item=T_AVX_Sales_Ledger.SalesItemID IN BATCHES OF 1
Rule 2 If SEARCH_COUNT<>0 AND T_AVX_Sales_Ledger.SalesDateInvoiced BETWEEN AVX_SPA.SPA_StartDate AND AVX_SPA.SPA_ExpireDate Then
T_SalesLedgerDateRange.T_SPANumFound='Yes'
Rule 3 If T_SalesLedgerDateRange.T_SPANumFound='Yes' AND (T_AVX_Sales_Ledger.POSPAAuthAmt2=0 OR T_AVX_Sales_Ledger.POSPAAuthAmt2<>0) AND AVX_SPA.SPACost<T_AVX_Sales_Ledger.POSPAAuthAmt2 Then
T_SalesLedgerDateRange.T_SpaColumnUsed=1
T_SalesLedgerDateRange.T_SPAItem=AVX_SPA.CustPartNo_Item
T_SalesLedgerDateRange.T_SuggestedSPA=AVX_SPA.SPA_No
T_SalesLedgerDateRange.T_SPABookAmt=AVX_SPA.BookCost
T_SalesLedgerDateRange.T_SPAAuthAmt=AVX_SPA.SPACost
T_AVX_Sales_Ledger.SPAColumnUsed=1
T_AVX_Sales_Ledger.SPAItem=AVX_SPA.CustPartNo_Item
T_AVX_Sales_Ledger.SuggestedSPA=AVX_SPA.SPA_No
T_AVX_Sales_Ledger.POSPABookAmt2=AVX_SPA.BookCost
T_AVX_Sales_Ledger.POSPAAuthAmt2=AVX_SPA.SPACost
Does this help or just more confusion?
Desperate to get this resolved~ Roger