Dear All,
I am facing one problem in standard navision table 32 (ItemLedger entry table) has some fields which does not exist in SQL database however I can see them in Navision tables. I am using SQL 2005 and Navision 5.0
Enabled Field No. Field Name Data Type
Yes 5803 Cost Amount (Expected) Decimal
Yes 5804 Cost Amount (Actual) Decimal
Yes 5805 Cost Amount (Non-Invtbl.) Decimal
Yes 5806 Cost Amount (Expected) (ACY) Decimal
Yes 5807 Cost Amount (Actual) (ACY) Decimal
Yes 5808 Cost Amount (Non-Invtbl.)(ACY) Decimal
Yes 5813 Purchase Amount (Expected) Decimal
When I try to look the above mentioned fields in SQL Database I can not find them.
I am trying to make a report using these standard fields by writing an SQL query but I am unable to find any one can give me any hint where can I find data of these fields.
Regards,
0
Answers
RIS Plus, LLC
So is there any way I can get the same info from SQL databse?
As mentioned, to get the content of those "Fields" you need to create sub-queries on the underlying tables. Maybe this little tool could help you: http://www.mibuso.com/dlinfo.asp?FileID=1101
Regards,
Jörg
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool
Installation:
1. Import "SSRS_Helper_CTP1.fob" (or "SSRS_Helper_CTP1.txt") with NAV "Object Designer"
2. Compile imported Objects
Objects:
Table 80000 SSRS Helper: Option to TSQL 11.05.09 12:00:00 SSI/SSRSHelper1.00
Table 80001 SSRS Helper: FlowField to TSQL 11.05.09 12:00:00 SSI/SSRSHelper1.00
Report 80000 SSRS Helper: Import FlowFields 11.05.09 12:00:00 SSI/SSRSHelper1.00
Codeunit 80000 SSRS Helper 11.05.09 12:00:00 SSI/SSRSHelper1.00
Usage:
1. Export all Tables (via NAV "Object Designer") to TXT file
2. Run Codeunit 80000 and follow instruction
Table 80000 and 80001 will then contain the (T)SQL code to use with SSRS
I downloaded the tool as mentioned in the above mentioned link but when I run the codeunit 80000 it is not giving any data in tabel 80001 .
Any idea please?
T80001 is filled via Report 80000 "SSRS Helper: Import FlowFields" - this one imports the previously genereated Table-Object-TXT file.
So you imported the TXT and still the table is empty?
Which NAV version do you use?
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool
I tried to run the report 80000 "SSRS Helper: Import FlowFields" but it does not give any option to save any text file it just ask the file name to open. Also it give me check box for Parse only I dont know what does it mean exactly.
I am doing following steps,
1. Running the codeunit 80000 "SSRS Helper"
2. Selecting Option 3 Both.
It asks me to open a file which I dont have. Then I checked the table Table one 80000 "SSRS Helper: Option to TSQL" is filled with some data but table 2 80001 "SSRS Helper: FlowField to TSQL" is empty.
As per your advise I run the report 80000 "SSRS Helper: Import FlowFields" but it is asking me the file name to open same as it asks me when I run the code unit 80000 "SSRS Helper" with option 3 "Both"
Am I doing some thing wrong? Please suggest further.
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool
I tried to follow the steps as you explained. I dont know if I really understand them correctl now I am doing followings;
made a dataport to export the date from table 80000 since I dont have any data in table 800001, saved the text file it shows data some thing like below;
27 19 Item Price/Profit Calculation Profit=Price-Cost,Price=Cost+Profit,No Relationship CASE [Price_Profit Calculation] WHEN 0 THEN 'Profit=Price-Cost' WHEN 1 THEN 'Price=Cost+Profit' WHEN 2 THEN 'No Relationship' END AS [Price/Profit Calculation] Yes
27 21 Item Costing Method FIFO,LIFO,Specific,Average,Standard CASE [Costing Method] WHEN 0 THEN 'FIFO' WHEN 1 THEN 'LIFO' WHEN 2 THEN 'Specific' WHEN 3 THEN 'Average' WHEN 4 THEN 'Standard' END AS [Costing Method] Yes
27 100 Item Reserve Never,Optional,Always CASE [Reserve] WHEN 0 THEN 'Never' WHEN 1 THEN 'Optional' WHEN 2 THEN 'Always' END AS [Reserve] Yes
27 5417 Item Flushing Method Manual,Forward,Backward,Pick + Forward,Pick + Backward CASE [Flushing Method] WHEN 0 THEN 'Manual' WHEN 1 THEN 'Forward' WHEN 2 THEN 'Backward' WHEN 3 THEN 'Pick + Forward' WHEN 4 THEN 'Pick + Backward' END AS [Flushing Method] Yes
27 5419 Item Replenishment System Purchase,Prod. Order, CASE [Replenishment System] WHEN 0 THEN 'Purchase' WHEN 1 THEN 'Prod. Order' WHEN 2 THEN ' ' END AS [Replenishment System] Yes
27 5440 Item Reordering Policy ,Fixed Reorder Qty.,Maximum Qty.,Order,Lot-for-Lot CASE [Reordering Policy] WHEN 0 THEN ' ' WHEN 1 THEN 'Fixed Reorder Qty.' WHEN 2 THEN 'Maximum Qty.' WHEN 3 THEN 'Order' WHEN 4 THEN 'Lot-for-Lot' END AS [Reordering Policy] Yes
27 5442 Item Manufacturing Policy Make-to-Stock,Make-to-Order CASE [Manufacturing Policy] WHEN 0 THEN 'Make-to-Stock' WHEN 1 THEN 'Make-to-Order' END AS [Manufacturing Policy] Yes
27 10000712 Item Item Error Check Status Unchecked,Passed,Failed CASE [Item Error Check Status] WHEN 0 THEN 'Unchecked' WHEN 1 THEN 'Passed' WHEN 2 THEN 'Failed' END AS [Item Error Check Status] Yes
27 10000909 Item Def. Ordered by Store,Central CASE [Def_ Ordered by] WHEN 0 THEN 'Store' WHEN 1 THEN 'Central' END AS [Def. Ordered by] Yes
27 10000910 Item Def. Ordering Method By hand,Calculate CASE [Def_ Ordering Method] WHEN 0 THEN 'By hand' WHEN 1 THEN 'Calculate' END AS [Def. Ordering Method] Yes
27 10001200 Item BOM Sales Type No Exploding,Explode at Entry,Explode at Posting CASE [BOM Sales Type] WHEN 0 THEN 'No Exploding' WHEN 1 THEN 'Explode at Entry' WHEN 2 THEN 'Explode at Posting' END AS [BOM Sales Type] Yes
27 10001201 Item BOM Receipt Print Normal,Compressed CASE [BOM Receipt Print] WHEN 0 THEN 'Normal' WHEN 1 THEN 'Compressed' END AS [BOM Receipt Print] Yes
27 10001203 Item Recipe Item Type ,Ingredient,Recipe CASE [Recipe Item Type] WHEN 0 THEN ' ' WHEN 1 THEN 'Ingredient' WHEN 2 THEN 'Recipe' END AS [Recipe Item Type] Yes
27 10012201 Item Replenishment Calculation Type ,Average Usage,Manual Estimate,Stock Levels,Like for Like CASE [Replenishment Calculation Type] WHEN 0 THEN ' ' WHEN 1 THEN 'Average Usage' WHEN 2 THEN 'Manual Estimate' WHEN 3 THEN 'Stock Levels' WHEN 4 THEN 'Like for Like' END AS [Replenishment Calculation Type] Yes
27 10012207 Item Replenishment Method Warehouse,Purchase,None CASE [Replenishment Method] WHEN 0 THEN 'Warehouse' WHEN 1 THEN 'Purchase' WHEN 2 THEN 'None' END AS [Replenishment Method] Yes
27 10012216 Item Purch. Order Delivery To Warehouse,To Store CASE [Purch_ Order Delivery] WHEN 0 THEN 'To Warehouse' WHEN 1 THEN 'To Store' END AS [Purch. Order Delivery] Yes
27 99000773 Item Order Tracking Policy None,Tracking Only,Tracking & Action Msg. CASE [Order Tracking Policy] WHEN 0 THEN 'None' WHEN 1 THEN 'Tracking Only' WHEN 2 THEN 'Tracking & Action Msg.' END AS [Order Tracking Policy] Yes
27 99001471 Item POS Cost Calculation Item Based,Product Group Based,Item Cat. Based CASE [POS Cost Calculation] WHEN 0 THEN 'Item Based' WHEN 1 THEN 'Product Group Based' WHEN 2 THEN 'Item Cat. Based' END AS [POS Cost Calculation] Yes
27 99001487 Item Keying in Price Not Mandatory,Must Key in New Price,Must Key in Higher/Equal Price,Must Key in Lower/Equal Price,Must not Key in Price CASE [Keying in Price] WHEN 0 THEN 'Not Mandatory' WHEN 1 THEN 'Must Key in New Price' WHEN 2 THEN 'Must Key in Higher/Equal Price' WHEN 3 THEN 'Must Key in Lower/Equal Price' WHEN 4 THEN 'Must not Key in Price' END AS [Keying in Price] Yes
27 99001491 Item Keying in Quantity Not Mandatory,Must Key in Quantity,Must not Key in Quantity CASE [Keying in Quantity] WHEN 0 THEN 'Not Mandatory' WHEN 1 THEN 'Must Key in Quantity' WHEN 2 THEN 'Must not Key in Quantity' END AS [Keying in Quantity] Yes
32 4 Item Ledger Entry Entry Type Purchase,Sale,Positive Adjmt.,Negative Adjmt.,Transfer,Consumption,Output CASE [Entry Type] WHEN 0 THEN 'Purchase' WHEN 1 THEN 'Sale' WHEN 2 THEN 'Positive Adjmt.' WHEN 3 THEN 'Negative Adjmt.' WHEN 4 THEN 'Transfer' WHEN 5 THEN 'Consumption' WHEN 6 THEN 'Output' END AS [Entry Type] Yes
I made an other text file by exporting the table objects as I understood from you just to try to work with report 80000 the second text file had the data like below;
OBJECT Table 80000 SSRS Helper: Option to TSQL
{
OBJECT-PROPERTIES
{
Date=05/11/09;
Time=12:00:00 PM;
Modified=Yes;
Version List=SSI/SSRSHelper1.00;
}
PROPERTIES
{
DataPerCompany=No;
CaptionML=ENU=SSRS Helper: Option to TSQL;
}
FIELDS
{
{ 1 ; ;Table ID ;Integer ;TableRelation=AllObj."Object ID" WHERE (Object Type=CONST(Table),
Object ID=FIELD(Table ID));
CaptionML=ENU=Table ID }
{ 2 ; ;Field ID ;Integer ;TableRelation=Field.No. WHERE (TableNo=FIELD(Table ID));
CaptionML=ENU=Field ID }
{ 3 ; ;Table Name ;Text30 ;FieldClass=Normal;
CaptionML=ENU=Table Name;
Editable=No }
{ 4 ; ;Field Name ;Text30 ;FieldClass=Normal;
CaptionML=ENU=Field Name;
Editable=No }
{ 5 ; ;Option String 1 ;Text250 ;CaptionML=ENU=Option String 1 }
{ 6 ; ;Option String 2 ;Text250 ;CaptionML=ENU=Option String 2 }
{ 7 ; ;Option String 3 ;Text250 ;CaptionML=ENU=Option String 3 }
{ 8 ; ;Option String 4 ;Text250 ;CaptionML=ENU=Option String 4 }
{ 9 ; ;TSQL 1 ;Text250 ;CaptionML=ENU=TSQL 1 }
{ 10 ; ;TSQL 2 ;Text250 ;CaptionML=ENU=TSQL 2 }
{ 11 ; ;TSQL 3 ;Text250 ;CaptionML=ENU=TSQL 3 }
{ 12 ; ;TSQL 4 ;Text250 ;CaptionML=ENU=TSQL 4 }
{ 50 ; ;Data Per Company ;Boolean ;CaptionML=ENU=Data Per Company }
}
KEYS
{
{ ;Table ID,Field ID }
}
CODE
{
BEGIN
{
*** DO NOT REMOVE ANY REFERENCE TO THE ORIGINATOR OR OTHER ACKNOWLEDGEMENT ***
Date Version/Release Name/Reference
==============================================================================
11.05.2009: SSRS Helper 1.0 (CTP 1) STRYK System Improvement, J”rg Stryk
The Software is provided "AS IS" - no guarantee, no warrantee, no support.
Use at own risk.
}
END.
}
}
OBJECT Table 80001 SSRS Helper: FlowField to TSQL
{
OBJECT-PROPERTIES
{
Date=05/11/09;
Time=12:00:00 PM;
Modified=Yes;
Version List=SSI/SSRSHelper1.00;
}
PROPERTIES
{
DataPerCompany=No;
CaptionML=ENU=SSRS Helper: FlowField to TSQL;
}
FIELDS
{
{ 1 ; ;Table ID ;Integer ;TableRelation=AllObj."Object ID" WHERE (Object Type=CONST(Table),
Object ID=FIELD(Table ID));
CaptionML=ENU=Table ID }
{ 2 ; ;Field ID ;Integer ;TableRelation=Field.No. WHERE (TableNo=FIELD(Table ID));
CaptionML=ENU=Field ID }
{ 3 ; ;Table Name ;Text30 ;FieldClass=Normal;
CaptionML=ENU=Table Name;
Editable=No }
{ 4 ; ;Field Name ;Text30 ;FieldClass=Normal;
CaptionML=ENU=Field Name;
Editable=No }
{ 5 ; ;CalcFormula 1 ;Text250 ;CaptionML=ENU=CalcFormula 1 }
{ 6 ; ;CalcFormula 2 ;Text250 ;CaptionML=ENU=CalcFormula 2 }
{ 7 ; ;CalcFormula 3 ;Text250 ;CaptionML=ENU=CalcFormula 3 }
{ 8 ; ;CalcFormula 4 ;Text250 ;CaptionML=ENU=CalcFormula 4 }
{ 9 ; ;TSQL 1 ;Text250 ;CaptionML=ENU=TSQL 1 }
{ 10 ; ;TSQL 2 ;Text250 ;CaptionML=ENU=TSQL 2 }
{ 11 ; ;TSQL 3 ;Text250 ;CaptionML=ENU=TSQL 3 }
{ 12 ; ;TSQL 4 ;Text250 ;CaptionML=ENU=TSQL 4 }
{ 50 ; ;Data Per Company ;Boolean ;CaptionML=ENU=Data Per Company }
}
KEYS
{
{ ;Table ID,Field ID }
}
CODE
{
BEGIN
{
*** DO NOT REMOVE ANY REFERENCE TO THE ORIGINATOR OR OTHER ACKNOWLEDGEMENT ***
Date Version/Release Name/Reference
==============================================================================
11.05.2009: SSRS Helper 1.0 (CTP 1) STRYK System Improvement, J”rg Stryk
The Software is provided "AS IS" - no guarantee, no warrantee, no support.
Use at own risk.
}
END.
}
}
But running the report with importing both the text files as shown above gave me the same message "there is nothing parse".
I will appreciate your further advise and thankful for your patience with me.
Open NAV, switch to "Object Designer"
Select all Tables you want to analyze
Click "File - Export" and choose "TXT" Format
THIS is the Text-File you have to import with the tool ...
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool
As you suggested I exported the table 27 and table 80000 in text file and when I try to import with report 80000 it says the same message there is nothing parse.
If I run codeunit 80000 it only fills values in T80000 but nothing in T800001 and when this code unit runs the report 80000 it gives the same message nothing to parse.
May be I need to have the same utility or I have some thing different than you so if you can please mail me the same utility as you have just to make sure.
Regards,
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool
Here is the text file of table 27, Please note this is not complete text since here is a limitation of 65000 characters only.
OBJECT Table 27 Item
{
OBJECT-PROPERTIES
{
Date=11/02/09;
Time=11:38:26 AM;
Modified=Yes;
Version List=NAVW15.00,LS5.0;
}
PROPERTIES
{
Permissions=;
DataCaptionFields=No.,Description;
OnInsert=VAR
MealPlanSetup@1100409000 : Record 10012100;
BEGIN
IF "No." = '' THEN BEGIN
//LS Start
IF "No. Series" <> '' THEN BEGIN
NoSeriesMgt.InitSeries("No. Series",xRec."No. Series",0D,"No.","No. Series");
END ELSE BEGIN
IF NOT MealPlanSetup.GET THEN
CLEAR(MealPlanSetup);
IF MealPlanSetup."Meal Planning Module in Use" THEN BEGIN
IF "Recipe Item Type" = "Recipe Item Type"::Recipe THEN BEGIN
IF MealPlanSetup."Item Recipe Nos." <> '' THEN
NoSeriesMgt.InitSeries(MealPlanSetup."Item Recipe Nos.",xRec."No. Series",0D,"No.","No. Series");
END;
END;
IF "No. Series" = '' THEN BEGIN
RetailSetup.GET();
IF NOT Store.GET(RetailSetup."Local Store No.") THEN
CLEAR(Store);
IF Store."Item Nos." <> '' THEN BEGIN
NoSeriesMgt.InitSeries(Store."Item Nos.",xRec."No. Series",0D,"No.","No. Series");
END ELSE BEGIN
GetInvtSetup;
InvtSetup.TESTFIELD("Item Nos.");
NoSeriesMgt.InitSeries(InvtSetup."Item Nos.",xRec."No. Series",0D,"No.","No. Series");
END;
END;
END;
//LS Stop
END;
DimMgt.UpdateDefaultDim(
DATABASE::Item,"No.",
"Global Dimension 1 Code","Global Dimension 2 Code");
OnInsertItem; //LS
END;
OnModify=BEGIN
"Last Date Modified" := TODAY;
PlanningAssignment.ItemChange(Rec,xRec);
OnModifyItem; //LS
END;
OnDelete=VAR
BinContent@1000 : Record 7302;
BEGIN
BOMComp.RESET;
BOMComp.SETCURRENTKEY(Type,"No.");
BOMComp.SETRANGE(Type,BOMComp.Type::Item);
BOMComp.SETRANGE("No.","No.");
IF BOMComp.FIND('-') THEN
ERROR(Text023,TABLECAPTION,"No.",BOMComp.TABLECAPTION);
ItemJnlLine.SETRANGE("Item No.","No.");
IF ItemJnlLine.FIND('-') THEN
ERROR(Text023,TABLECAPTION,"No.",ItemJnlLine.TABLECAPTION);
RequisitionLine.SETCURRENTKEY(Type,"No.");
RequisitionLine.SETRANGE(Type,RequisitionLine.Type::Item);
RequisitionLine.SETRANGE("No.","No.");
IF NOT RequisitionLine.ISEMPTY THEN
ERROR(Text023,TABLECAPTION,"No.",RequisitionLine.TABLECAPTION);
PurchOrderLine.SETCURRENTKEY(Type,"No.");
PurchOrderLine.SETRANGE(Type,PurchOrderLine.Type::Item);
PurchOrderLine.SETRANGE("No.","No.");
IF PurchOrderLine.FIND('-') THEN
ERROR(Text000,TABLECAPTION,"No.",PurchOrderLine."Document Type");
SalesOrderLine.SETCURRENTKEY(Type,"No.");
SalesOrderLine.SETRANGE(Type,SalesOrderLine.Type::Item);
SalesOrderLine.SETRANGE("No.","No.");
IF SalesOrderLine.FIND('-') THEN
ERROR(Text001,TABLECAPTION,"No.",SalesOrderLine."Document Type");
IF ProdOrderExist THEN
ERROR(Text002,TABLECAPTION,"No.");
ProdOrderComp.SETCURRENTKEY(Status,"Item No.");
ProdOrderComp.SETFILTER(Status,'..%1',ProdOrderComp.Status::Released);
ProdOrderComp.SETRANGE("Item No.","No.");
IF ProdOrderComp.FIND('-') THEN
ERROR(Text014,TABLECAPTION,"No.");
TransLine.SETCURRENTKEY("Item No.");
TransLine.SETRANGE("Item No.","No.");
IF TransLine.FIND('-') THEN
ERROR(Text016,TABLECAPTION,"No.");
ServInvLine.RESET;
ServInvLine.SETCURRENTKEY(Type,"No.");
ServInvLine.SETRANGE(Type,ServInvLine.Type::Item);
ServInvLine.SETRANGE("No.","No.");
IF ServInvLine.FIND('-') THEN
ERROR(Text017,TABLECAPTION,"No.",ServInvLine."Document Type");
ProdBOMLine.RESET;
ProdBOMLine.SETCURRENTKEY(Type,"No.");
ProdBOMLine.SETRANGE(Type,ProdBOMLine.Type::Item);
ProdBOMLine.SETRANGE("No.","No.");
IF ProdBOMLine.FIND('-') THEN
REPEAT
IF ProdBOMHeader.GET(ProdBOMLine."Production BOM No.") AND
(ProdBOMHeader.Status = ProdBOMHeader.Status::Certified)
THEN
ERROR(Text004,TABLECAPTION,"No.");
UNTIL ProdBOMLine.NEXT = 0;
ServiceContractLine.RESET;
ServiceContractLine.SETRANGE("Item No.","No.");
IF ServiceContractLine.FIND('-') THEN
ERROR(Text023,TABLECAPTION,"No.",ServiceContractLine.TABLECAPTION);
ServiceItem.RESET;
ServiceItem.SETRANGE("Item No.","No.");
IF ServiceItem.FIND('-') THEN
REPEAT
ServiceItem.VALIDATE("Item No.",'');
ServiceItem.MODIFY(TRUE);
UNTIL ServiceItem.NEXT = 0;
MoveEntries.MoveItemEntries(Rec);
ItemBudgetEntry.SETCURRENTKEY("Analysis Area","Budget Name","Item No.");
ItemBudgetEntry.SETRANGE("Item No.","No.");
ItemBudgetEntry.DELETEALL(TRUE);
ItemSub.RESET;
ItemSub.SETRANGE(Type,ItemSub.Type::Item);
ItemSub.SETRANGE("No.","No.");
ItemSub.DELETEALL;
ItemSub.RESET;
ItemSub.SETRANGE("Substitute Type",ItemSub."Substitute Type"::Item);
ItemSub.SETRANGE("Substitute No.","No.");
ItemSub.DELETEALL;
SKU.RESET;
SKU.SETCURRENTKEY("Item No.");
SKU.SETRANGE("Item No.","No.");
SKU.DELETEALL;
NonstockItemMgt.NonstockItemDel(Rec);
CommentLine.SETRANGE("Table Name",CommentLine."Table Name"::Item);
CommentLine.SETRANGE("No.","No.");
CommentLine.DELETEALL;
ItemVend.SETCURRENTKEY("Item No.");
ItemVend.SETRANGE("Item No.","No.");
ItemVend.DELETEALL;
SalesPrice.SETRANGE("Item No.","No.");
SalesPrice.DELETEALL;
SalesLineDisc.SETRANGE(Type,SalesLineDisc.Type::Item);
SalesLineDisc.SETRANGE(Code,"No.");
SalesLineDisc.DELETEALL;
SalesPrepmtPct.SETRANGE("Item No.","No.");
SalesPrepmtPct.DELETEALL;
PurchPrice.SETRANGE("Item No.","No.");
PurchPrice.DELETEALL;
PurchLineDisc.SETRANGE("Item No.","No.");
PurchLineDisc.DELETEALL;
PurchPrepmtPct.SETRANGE("Item No.","No.");
PurchPrepmtPct.DELETEALL;
ItemTranslation.SETRANGE("Item No.","No.");
ItemTranslation.DELETEALL;
ItemUnitOfMeasure.SETRANGE("Item No.","No.");
ItemUnitOfMeasure.DELETEALL;
ItemVariant.SETRANGE("Item No.","No.");
ItemVariant.DELETEALL;
ExtTextHeader.SETRANGE("Table Name",ExtTextHeader."Table Name"::Item);
ExtTextHeader.SETRANGE("No.","No.");
ExtTextHeader.DELETEALL(TRUE);
ItemAnalysisViewEntry.SETRANGE("Item No.","No.");
ItemAnalysisViewEntry.DELETEALL;
ItemAnalysisBudgViewEntry.SETRANGE("Item No.","No.");
ItemAnalysisBudgViewEntry.DELETEALL;
PlanningAssignment.SETRANGE("Item No.","No.");
PlanningAssignment.DELETEALL;
BOMComp.SETRANGE("Parent Item No.","No.");
BOMComp.DELETEALL;
TroubleshSetup.RESET;
TroubleshSetup.SETRANGE(Type,TroubleshSetup.Type::Item);
TroubleshSetup.SETRANGE("No.","No.");
TroubleshSetup.DELETEALL;
ResSkillMgt.DeleteItemResSkills("No.");
DimMgt.DeleteDefaultDim(DATABASE::Item,"No.");
ItemIdent.RESET;
ItemIdent.SETCURRENTKEY("Item No.");
ItemIdent.SETRANGE("Item No.","No.");
ItemIdent.DELETEALL;
ServiceItemComponent.RESET;
ServiceItemComponent.SETRANGE(Type,ServiceItemComponent.Type::Item);
ServiceItemComponent.SETRANGE("No.","No.");
ServiceItemComponent.MODIFYALL("No.",'');
BinContent.SETCURRENTKEY("Item No.");
BinContent.SETRANGE("Item No.","No.");
BinContent.DELETEALL;
OnDeleteItem; //LS
END;
OnRename=BEGIN
"Last Date Modified" := TODAY;
OnRenameItem; //LS
END;
CaptionML=ENU=Item;
LookupFormID=Form31;
DrillDownFormID=Form31;
}
FIELDS
{
{ 1 ; ;No. ;Code20 ;AltSearchField=Search Description;
OnValidate=BEGIN
IF "No." <> xRec."No." THEN BEGIN
GetInvtSetup;
NoSeriesMgt.TestManual(InvtSetup."Item Nos.");
"No. Series" := '';
END;
ValidateItemNo(); //LS
END;
CaptionML=ENU=No. }
{ 2 ; ;No. 2 ;Code20 ;CaptionML=ENU=No. 2 }
{ 3 ; ;Description ;Text50 ;OnValidate=BEGIN
IF ("Search Description" = UPPERCASE(xRec.Description)) OR ("Search Description" = '') THEN
"Search Description" := Description;
IF "Created From Nonstock Item" THEN BEGIN
NonstockItem.SETCURRENTKEY("Item No.");
NonstockItem.SETRANGE("Item No.","No.");
IF NonstockItem.FIND('-') THEN
IF NonstockItem.Description = '' THEN BEGIN
NonstockItem.Description := Description;
NonstockItem.MODIFY;
END;
END;
END;
CaptionML=ENU=Description }
{ 4 ; ;Search Description ;Code30 ;CaptionML=ENU=Search Description }
{ 5 ; ;Description 2 ;Text30 ;CaptionML=ENU=Description 2 }
{ 6 ; ;Bill of Materials ;Boolean ;FieldClass=FlowField;
CalcFormula=Exist("BOM Component" WHERE (Parent Item No.=FIELD(No.)));
CaptionML=ENU=Bill of Materials;
Editable=No }
{ 8 ; ;Base Unit of Measure;Code10 ;TableRelation="Item Unit of Measure".Code WHERE (Item No.=FIELD(No.));
OnValidate=BEGIN
TestNoOpenEntriesExist(FIELDCAPTION("Base Unit of Measure"));
"Sales Unit of Measure" := "Base Unit of Measure";
"Purch. Unit of Measure" := "Base Unit of Measure";
IF "Base Unit of Measure" <> '' THEN BEGIN
ItemUnitOfMeasure.GET("No.","Base Unit of Measure");
ItemUnitOfMeasure.TESTFIELD("Qty. per Unit of Measure",1);
END;
IF CurrFieldNo <> 0 THEN
MODIFY(TRUE);
END;
CaptionML=ENU=Base Unit of Measure }
{ 9 ; ;Price Unit Conversion;Integer ;CaptionML=ENU=Price Unit Conversion }
{ 11 ; ;Inventory Posting Group;Code10 ;TableRelation="Inventory Posting Group";
CaptionML=ENU=Inventory Posting Group }
{ 12 ; ;Shelf No. ;Code10 ;CaptionML=ENU=Shelf No. }
{ 14 ; ;Item Disc. Group ;Code10 ;TableRelation="Item Discount Group";
CaptionML=ENU=Item Disc. Group }
{ 15 ; ;Allow Invoice Disc. ;Boolean ;InitValue=Yes;
CaptionML=ENU=Allow Invoice Disc. }
{ 16 ; ;Statistics Group ;Integer ;CaptionML=ENU=Statistics Group }
{ 17 ; ;Commission Group ;Integer ;CaptionML=ENU=Commission Group }
{ 18 ; ;Unit Price ;Decimal ;OnValidate=BEGIN
VALIDATE("Price/Profit Calculation");
END;
CaptionML=ENU=Unit Price;
MinValue=0;
AutoFormatType=2 }
{ 19 ; ;Price/Profit Calculation;Option ;OnValidate=VAR
ItemControl@1100409000 : Codeunit 10000711;
BEGIN
IF "Price Includes VAT" AND
("Price/Profit Calculation" < "Price/Profit Calculation"::"No Relationship")
THEN BEGIN
VATPostingSetup.GET("VAT Bus. Posting Gr. (Price)","VAT Prod. Posting Group");
CASE VATPostingSetup."VAT Calculation Type" OF
VATPostingSetup."VAT Calculation Type"::"Reverse Charge VAT":
VATPostingSetup."VAT %" := 0;
VATPostingSetup."VAT Calculation Type"::"Sales Tax":
ERROR(
Text006,
VATPostingSetup.FIELDCAPTION("VAT Calculation Type"),
VATPostingSetup."VAT Calculation Type");
END;
END ELSE
CLEAR(VATPostingSetup);
CASE "Price/Profit Calculation" OF
"Price/Profit Calculation"::"Profit=Price-Cost":
IF "Unit Price" <> 0 THEN
"Profit %" :=
ROUND(
100 * (1 - "Unit Cost" / ("Unit Price" /
(1 + VATPostingSetup."VAT %" / 100))),0.00001)
ELSE
"Profit %" := 0;
"Price/Profit Calculation"::"Price=Cost+Profit":
IF "Profit %" < 100 THEN BEGIN
GetGLSetup;
"Unit Price" :=
ROUND(
("Unit Cost" / (1 - "Profit %" / 100)) *
(1 + VATPostingSetup."VAT %" / 100),GLSetup."Unit-Amount Rounding Precision");
END;
END;
//LS Start
CalcPriceInclVAT();
UpdateItemPrice();
ItemControl."Update Cost Price History"(Rec);
//LS Stop
END;
CaptionML=ENU=Price/Profit Calculation;
OptionCaptionML=ENU="Profit=Price-Cost,Price=Cost+Profit,No Relationship";
OptionString=Profit=Price-Cost,Price=Cost+Profit,No Relationship }
{ 20 ; ;Profit % ;Decimal ;OnValidate=BEGIN
VALIDATE("Price/Profit Calculation");
END;
CaptionML=ENU=Profit %;
DecimalPlaces=0:5;
MaxValue=9,999,999 }
{ 21 ; ;Costing Method ;Option ;OnValidate=BEGIN
IF "Costing Method" = xRec."Costing Method" THEN
EXIT;
IF "Costing Method" = "Costing Method"::Specific THEN BEGIN
TESTFIELD("Item Tracking Code");
ItemTrackingCode.GET("Item Tracking Code");
IF NOT ItemTrackingCode."SN Specific Tracking" THEN
ERROR(
Text018,
ItemTrackingCode.FIELDCAPTION("SN Specific Tracking"),
FORMAT(TRUE),ItemTrackingCode.TABLECAPTION,ItemTrackingCode.Code,
FIELDCAPTION("Costing Method"),"Costing Method");
END;
TestNoEntriesExist(FIELDCAPTION("Costing Method"));
ItemCostMgt.UpdateUnitCost(Rec,'','',0,0,FALSE,FALSE,TRUE,FIELDNO("Costing Method"));
END;
CaptionML=ENU=Costing Method;
OptionCaptionML=ENU=FIFO,LIFO,Specific,Average,Standard;
OptionString=FIFO,LIFO,Specific,Average,Standard }
{ 22 ; ;Unit Cost ;Decimal ;OnValidate=BEGIN
IF ("Costing Method" = "Costing Method"::Standard) THEN
VALIDATE("Standard Cost","Unit Cost")
ELSE
//LS Start
BEGIN
TestNoEntriesExist(FIELDCAPTION("Unit Cost"));
VALIDATE("Price/Profit Calculation");
END;
//LS Stop
END;
CaptionML=ENU=Unit Cost;
MinValue=0;
AutoFormatType=2 }
{ 24 ; ;Standard Cost ;Decimal ;OnValidate=BEGIN
IF ("Costing Method" = "Costing Method"::Standard) AND (CurrFieldNo <> 0) THEN
IF NOT GUIALLOWED THEN BEGIN
"Standard Cost" := xRec."Standard Cost";
EXIT;
END ELSE
IF NOT
CONFIRM(
Text020 +
Text021 +
Text022,FALSE,
FIELDCAPTION("Standard Cost"))
THEN BEGIN
"Standard Cost" := xRec."Standard Cost";
EXIT;
END;
ItemCostMgt.UpdateUnitCost(Rec,'','',0,0,FALSE,FALSE,TRUE,FIELDNO("Standard Cost"));
END;
}
Regards,
Jörg
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool
After fixing that I could import the TXT without any problems ...
(NAV 4.0.3.29821)
Hope this works on your site as well.
Regards,
Jörg
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool
Thank you so much for your support. It is working now.
Regards,
Sajid