Adjust Item-Cost batch

AJS
Member Posts: 12
Hi All,
We have a client database, which is running on SQL server, Adjust Item-Cost batch has never been run on the database. Now they want to have the Inventory Valuation, but when we have run the Adjust Item-Cost batch , it is very-very slow.
Please provide some insight , how we can speed up the process. Can we apply some filters , (we might have to change some coding)
Following are the Observations of the Database
Server Configuration
Xeon Processer : 2.8 Mhz
Ram : 2 GB RAM
Hard Disk : 270 GB
Free Space : 26 GB
No users are connected to server while the Batch Job is run.
Navision Version : NAVW13.70.00.09
Database : Sql Server
Database Size : 26GB
Last ILE Entry No : 1453979
Last Value Entry No : 1456696
Setup
Inventry Cost Posting
Automatic : True
Expecterd : False
Adjust Item-Cost batch has never been run on the database.
There are few items where the system is taking more then 1 day to process.
Databse is having transactions of more then 1.5 years.
Queries
1. Is there any way we can run the batch job Item/Date wise?
2. How to reduce the time of batch job?
Thanks,
AJS
We have a client database, which is running on SQL server, Adjust Item-Cost batch has never been run on the database. Now they want to have the Inventory Valuation, but when we have run the Adjust Item-Cost batch , it is very-very slow.
Please provide some insight , how we can speed up the process. Can we apply some filters , (we might have to change some coding)
Following are the Observations of the Database
Server Configuration
Xeon Processer : 2.8 Mhz
Ram : 2 GB RAM
Hard Disk : 270 GB
Free Space : 26 GB
No users are connected to server while the Batch Job is run.
Navision Version : NAVW13.70.00.09
Database : Sql Server
Database Size : 26GB
Last ILE Entry No : 1453979
Last Value Entry No : 1456696
Setup
Inventry Cost Posting
Automatic : True
Expecterd : False
Adjust Item-Cost batch has never been run on the database.
There are few items where the system is taking more then 1 day to process.
Databse is having transactions of more then 1.5 years.
Queries
1. Is there any way we can run the batch job Item/Date wise?
2. How to reduce the time of batch job?
Thanks,
AJS
0
Comments
-
1. Add a ItemFilter variable to report 795.
2. Add new funtion to codeunit 5895 SetItemFilter(ItemFilter : Text[80])
3. Call the new funtion from report 795 before the line InvtAdjmt.MakeMultiLevelAdjmt;
4. Change the code in codeunit 5895 as followMakeSingleLevelAdjmt() : Boolean LevelNo[1] := LevelNo[1] + 1; Window.UPDATE(1,LevelNo[1]); ItemLedgEntry.SETCURRENTKEY("Item No."); // change IF ItemFilter <> '' THEN ItemLedgEntry.SETFILTER("Item No.",'%1',ItemFilter); // change IF NOT ItemLedgEntry.FIND('-') THEN EXIT(FALSE); REPEAT Window.UPDATE(2,ItemLedgEntry."Item No."); ItemLedgEntry.SETRANGE("Item No.",ItemLedgEntry."Item No."); GetCostingMethod(Item,ItemLedgEntry."Item No.",CostingMethod); IF CostingMethod = CostingMethod::Average THEN BEGIN AdjustCostApplied(ItemLedgEntry."Item No.",TRUE); // Restart adjustment, if too many recursions WHILE LevelExceeded DO BEGIN LevelExceeded := FALSE; AdjustCostApplied(ItemLedgEntry."Item No.",TRUE); END; AdjustAverage(ItemLedgEntry."Item No."); END ELSE BEGIN AdjustCostApplied(ItemLedgEntry."Item No.",FALSE); // Restart adjustment, if too many recursions WHILE LevelExceeded DO BEGIN LevelExceeded := FALSE; AdjustCostApplied(ItemLedgEntry."Item No.",FALSE); END; END; IF (CostingMethod <> CostingMethod::Standard) AND (Item."No." <> '') THEN ItemCostMgt.UpdateUnitCost(Item,'','',0,0,TRUE,FALSE,FALSE); ItemLedgEntry.FIND('+'); // change IF ItemFilter <> '' THEN ItemLedgEntry.SETFILTER("Item No.",'%1',ItemFilter) ELSE // change ItemLedgEntry.SETRANGE("Item No."); UNTIL (ItemLedgEntry.NEXT = 0) OR LevelExceeded; EXIT(TRUE);
This way you can run the report form one item a the time. You can also create a codeunit that runs the report for on item a the time and then do commit between.Bjarni Thor
bjarnib@dagurgroup.is0 -
Thanks a lot.
I will try this.
AJS0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions