Udostępnij za pośrednictwem


Assembly Management: Data Upgrade Step 2

The following table shows the actions that are performed in Step 2 in the Microsoft Dynamics NAV 2013 R2 Data Upgrade when Kitting is upgraded to Assembly Management.

Table From Field Value=old To Field Value=new Usage

104083 Temp BOM Component

Transfer all records to 90 BOM Component

Delete when done

104081 Temp Item

Refer to when update 27 Item

Delete when done

104085 Temp Warehouse Shipment Line

Refer to when update 7321 Warehouse Shipment Line

Delete when done

104084 Temp Warehouse Activity Line

Refer to when update 5767 Warehouse Activity Line

Delete when done

27 Item

Replenishment System

:= Assembly

IF TempItem."Automatic Build Kit BOM":=True

IF TempItem."Assembly BOM" <> blank and Item."Replenishment System"::Prod.Order

Assembly Policy

:=Assemble-to-Order

IF TempItem."Automatic Build Kit BOM":=True

5700 Stockkeeping Unit

Replenishment System

:= Assembly

IF Item."Replenishment System"::Assembly

Assembly Policy

:= Assemble-to-Order

IF Item."Assembly Policy":=Assemble-to-Order

104082 Temp Sales Line

Refer to when update 37 Sales Line:"Build kit":=True is used when converting Sales Kit line to Assemble-to-Order Sales line

Delete when done

25000 Kit Sales Line

Refer to when create: 900 Assembly Header, 901 Assembly Line, 904 Assemble-to-Order Link

Refer to when update: 337 Reservation Entry, 36 Sales Header

Transfer to 901 Assembly Line

Delete when done

900 Assembly Header

Status

:= Released IF SalesHeader.Status=Released

Document Type

:= Order IF SalesLine."Document Type"::Order

:= Quote IF SalesLine."Document Type"::Quote

:= Blanket Order IF SalesLine."Document Type"::Blanket Order

No.

:= AsmOrderNo IF "Document Type"::Order

:= AsmQuoteNo IF "Document Type"::Quote

:= AsmBlOrderNo IF "Document Type"::Blanket Order

Error if "Document Type"::<>Order, Quote,Blanket Order

Description

:= SalesLine.Description

Search Description

:= Description

Description 2

:= SalesLine."Description 2"

Item No.

:=SalesLine."No."

Variant Code

:= SalesLine."Variant Code"

Inventory Posting Group

:= SalesLine."Posting Group"

Gen. Prod. Posting Group

:= SalesLine."Gen. Prod. Posting Group"

Location Code

:= SalesLine."Location Code"

Shortcut Dimension 1 Code

:= SalesLine."Shortcut Dimension 1 Code"

Shortcut Dimension 2 Code

:=SalesLine."Shortcut Dimension 2 Code"

Posting Date

:=SalesHeader."Posting Date"

Due Date

:= SalesLine."Shipment Date"

Starting Date

:= SalesLine."Shipment Date"

Ending Date

:= SalesLine."Shipment Date"

Bin Code

:= SalesLine."Bin Code"

Quantity := SalesLine.Quantity;

:= SalesLine.Quantity

Quantity (Base)

:= SalesLine."Quantity (Base)"

Remaining Quantity

:= SalesLine."Outstanding Quantity"

Remaining Quantity (Base)

:= SalesLine."Outstanding Qty. (Base)"

Assembled Quantity

:= SalesLine."Quantity Shipped"

Assembled Quantity (Base)

:= SalesLine."Qty. Shipped (Base)"

Quantity to Assemble

:= SalesLine."Qty. to Ship"

Quantity to Assemble (Base)

:= SalesLine."Qty. to Ship (Base)"

Planning Flexibility

:=None

Unit Cost

:= SalesLine."Unit Cost (LCY)"

Cost Amount

:= ROUND("Unit Cost" * Quantity)

Unit of Measure Code

:=SalesLine."Unit of Measure Code"

Qty. per Unit of Measure

:= SalesLine."Qty. per Unit of Measure"

Dimension Set ID

:= SalesLine."Dimension Set ID"

Rolled-up Assembly Cost

:= "Cost Amount"

901 Assembly Line

Document Type

:= AsmHeader."Document Type"

Document No.

:= AsmHeader."No."

Line No.

+= 10000

Type

:= blank IF KitSalesLine.Type::blank

:= Item IF KitSalesLine.Type::Item

:= Resource IF KitSalesLine.Type::Resource and IF KitSalesLine.Type::Setup Resource

Inventory Posting Group

Item."Inventory Posting Group" IF KitSalesLine."No."<>blank

Gen. Prod. Posting Group

:= Item."Gen. Prod. Posting Group" IF KitSalesLine."No."<>blank

Gen. Prod. Posting Group

:= Resource."Gen. Prod. Posting Group" IF KitSalesLine."No."<>blank

Resource Usage Type

:= Fixed IF KitSalesLine.Type::"Setup Resource"

No.

:= KitSalesLine."No."

Variant Code

:= KitSalesLine."Variant Code"

Description

:= KitSalesLine."Description"

Description 2

:= KitSalesLine."Description 2"

Location Code

:= "Location Code"

Shortcut Dimension 1 Code

:= KitSalesLine."Shortcut Dimension 1 Code"

Shortcut Dimension 2 Code

:= KitSalesLine."Shortcut Dimension 2 Code"

Bin Code

:= KitSalesLine."Bin Code"

Quantity

:= KitSalesLine."Extended Quantity"

Quantity (Base)

:= KitSalesLine."Extended Quantity (Base)"

Remaining Quantity

:= KitSalesLine."Outstanding Quantity"

Remaining Quantity (Base)

:= KitSalesLine."Outstanding Qty. (Base)"

Consumed Quantity

:= KitSalesLine."Extended Quantity" - KitSalesLine."Outstanding Quantity"

Consumed Quantity (Base)

:= KitSalesLine."Extended Quantity (Base)" - KitSalesLine."Outstanding Qty. (Base)"

Quantity to Consume

:= "Remaining Quantity"

Quantity to Consume (Base)

:= "Remaining Quantity (Base)"

Due Date

:= AsmHeader."Due Date"

Reserve

:= KitSalesLine."Reserve"

Quantity per

:= KitSalesLine."Quantity per"

Qty. per Unit of Measure

:= KitSalesLine."Qty. per Unit of Measure"

Unit Cost

:= KitSalesLine."Unit Cost (LCY)"

Cost Amount

:= ROUND(KitSalesLine."Extended Quantity (Base)" * KitSalesLine."Unit Cost (LCY)")

Unit of Measure Code

:= KitSalesLine."Unit of Measure Code"

904 Assemble-to-Order Link

Refer to when update 5767 Warehouse Activity Line

Assembly Document Type

:= AsmHeader."Document Type"

Assembly Document No.

:= AsmHeader."No."

Type

:= Sale

Document Type

:= SalesLine."Document Type"

Document No.

:= SalesLine."Document No."

Document Line No.

:= SalesLine."Line No."

337 Reservation Entry

Source Type,Database::"Kit Sales Line"

:= Database::"Assembly Line"

Source Subtype,KitSalesLine."Document Type"

:= AsmLine."Document Type"

Source ID,KitSalesLine."Document No."

:= AsmLine."Document No."

Source Prod. Order Line,KitSalesLine."Document Line No."

:= blank

Source Ref. No.,KitSalesLine."Line No."

:= AsmLine."Line No."

Source Batch Name

:= blank

37 Sales Line

Qty. to Assemble to Order

:= "Quantity"

Qty. to Asm. to Order (Base)

:= "Quantity (Base)"

Reserve

:= ::Optional

910 Posted Assembly Header

Posting Date

:= SalesShptHeader."Posting Date"

No.

:= PostedAsmOrderNo.

Description

:= SalesShptLine.Description

"Description 2"

:= SalesShptLine."Description 2"

Item No.

:= SalesShptLine."No."

Variant Code

:= SalesShptLine."Variant Code"

Inventory Posting Group

:= SalesShptLine."Posting Group"

Gen. Prod. Posting Group

:= SalesShptLine."Gen. Prod. Posting Group"

Location Code

:= SalesShptLine."Location Code"

Shortcut Dimension 1 Code

:= SalesShptLine."Shortcut Dimension 1 Code"

Shortcut Dimension 2 Code

:= SalesShptLine."Shortcut Dimension 2 Code"

Due Date

:= SalesShptLine."Shipment Date"

Starting Date

:= SalesShptLine."Shipment Date"

Ending Date

:= SalesShptLine."Shipment Date"

Bin Code

:= SalesShptLine."Bin Code"

Quantity

:= SalesShptLine.Quantity

Quantity (Base)

:= SalesShptLine."Quantity (Base)"

Unit Cost

:= SalesShptLine."Unit Cost (LCY)"

Cost Amount

:= ROUND("Unit Cost" * Quantity);

Unit of Measure Code

:= SalesShptLine."Unit of Measure Code"

Qty. per Unit of Measure

:= SalesShptLine."Qty. per Unit of Measure"

Dimension Set ID

:= SalesShptLine."Dimension Set ID"

911 Posted Assembly Line

Document No.

:= PostedAsmHeader."No."

Line No.

:= KitSalesShptLine."Line No."

Type

:= blank IF KitSalesShptLine.Type::blank

:=Item IF KitSalesShptLine.Type::Item

:=Resource IF KitSalesShptLine.Type::Resource and IF KitSalesShptLine.Type::Setup

Resource

Inventory Posting Group

:= Item."Inventory Posting Group" IF KitSalesShptLine."No."<>blank

Gen. Prod. Posting Group

:= Item."Gen. Prod. Posting Group" IF KitSalesShptLine."No."<>blank

Gen. Prod. Posting Group

:= Res."Gen. Prod. Posting Group" IF KitSalesShptLine."No."<>blank

Resource Usage Type

:= Fixed IF KitSalesShptLine.Type::"Setup Resource"

No.

:= KitSalesShptLine."No."

Variant Code

:= KitSalesShptLine."Variant Code"

Description

:= KitSalesShptLine.Description

Description 2

:= KitSalesShptLine."Description 2"

Location Code

:= KitSalesShptLine."Location Code"

Shortcut Dimension 1 Code

:= KitSalesShptLine."Shortcut Dimension 1 Code"

Shortcut Dimension 2 Code

:= KitSalesShptLine."Shortcut Dimension 2 Code"

Bin Code

:= KitSalesShptLine."Bin Code"

Quantity

:= KitSalesShptLine."Extended Quantity"

Quantity (Base)

:= KitSalesShptLine."Extended Quantity (Base)"

Due Date

:= PostedAsmHeader."Due Date"

Quantity per

:= KitSalesShptLine."Quantity per"

Qty. per Unit of Measure

KitSalesShptLine."Qty. per Unit of Measure"

Unit Cost

:= KitSalesShptLine."Unit Cost (LCY)"

Cost Amount

:= ROUND(KitSalesShptLine."Extended Quantity (Base)" * KitSalesShptLine."Unit Cost (LCY)")

Unit of Measure Code

:= KitSalesShptLine."Unit of Measure Code"

Create TempPostedAsmLine := PostedAsmLine IF PostedAsmLine."Quantity (Base)" <> 0

914 Posted Assemble-to-Order Link

Assembly Document Type

:= Assembly

Assembly Document No.

:= PostedAsmHeader."No."

Document Type

:= "Sales Shipment"

Document No.

:= SalesShptLine."Document No."

Document Line No.

:=SalesShptLine."Line No."

25004 Kit Sales Shipment Line

Transfer to 911 Posted Assembly Lines

Delete when done

5832 Capacity Ledger Entry

Entry No.

+= 1;

Posting Date

:= ValueEntry."Posting Date"

Type

:= Resource

No.

:= ValueEntry."No."

Description

:= ValueEntry."Description"

Document No.

:= ValueEntry."Document No."

Dimension Set ID

:= ValueEntry."Dimension Set ID"

Order Type

:= ValueEntry."Order Type"

Order No.

:= ValueEntry."Order No."

Order Line No.

:= ValueEntry."Order Line No."

Quantity

:= ValueEntry."Valued Quantity"

32 Item Ledger Entry

Create Posted Assembly Order IF:ItemLedgEntry."Document Type" := "Sales Shipment" and ItemLedgEntry."Order Type":= InvtAdjmtEntryOrder."Order Type"::Production and ItemLedgEntry."Order No.":= InvtAdjmtEntryOrder."Order No." and ItemLedgEntry."Order Line No.":= InvtAdjmtEntryOrder."Order Line No."

Update records:IF PostedAsmHeader."No." <> ''

Entry Type::Output

:= Assembly Output

Entry Type::Consumption

:= Assembly Consumption

Document Type

:= Posted Assembly

Document No.

:= PostedAsmOrderNo

Document Line No.

:= TempPostedAsmLine."Line No." IF

"Entry Type" := Assembly Consumption

TempPostedAsmLine."Type" := Item

TempPostedAsmLine."No.":= ItemLedgEntry."Item No."

TempPostedAsmLine."Variant Code":= ItemLedgEntry."Variant Code"

TempPostedAsmLine."Location Code" := ItemLedgEntry."Location Code"

Order Type

:= "Order Type"::Assembly

Order No.

:= PostedAsmHeader."Order No."

Order Line No.

:= "Document Line No."

5802 Value Entry

No.

:= TempPostedAsmLine."No."

Item Ledger Entry Type

:= ItemLedgEntry."Entry Type"

Document Type

:= ItemLedgEntry."Document Type" IF PostedAsmHeader."No." <> ''

Type

:= blank

Document No.

:= ItemLedgEntry."Document No." IF PostedAsmHeader."No." <> ''

Document Line No.

:= ItemLedgEntry."Document Line No." IF PostedAsmHeader."No." <> ''

:= TempPostedAsmLine."Line No." IF TempPostedAsmLine.Type := Resource AND

TempPostedAsmLine.Description := ValueEntry.Description AND

TempPostedAsmLine."Variant Code":= ItemLedgEntry."Variant Code" AND

TempPostedAsmLine."Location Code" := ItemLedgEntry."Location Code"

Order Type

:= InvtAdjmtEntryOrder."Order Type" IF PostedAsmHeader."No." <> ''

Order No.

:= AsmOrderNo IF PostedAsmHeader."No." <> ''

Order Line No.

:= ItemLedgEntry."Document Line No." IF PostedAsmHeader."No." <> ''

update records:

IF ValueEntry."Adjustment" :=True

AND "Source Type" := blank

AND "Item Ledger Entry Type" = ::Output

Capacity Ledger Entry No.

:= CapLedgEntry."Entry No."

Item Ledger Entry No.

:= 0

Adjustment

:= FALSE

Item Ledger Entry Type

:= blank

Type

:= Resource

5767 Warehouse Activity Line

For the records in TempWhseActivityLine table, change:

Source Type

:= "Assembly Line"

Source Subtype

:= ATOLink."Assembly Document Type"

Source No.

:= ATOLink."Assembly Document No."

Source Line No.

:= GetAsmLineNo(WhseActivityLine."Source Subline No.",ATOLink."Assembly Document Type",ATOLink."Assembly Document No.")

Source Subline No.

:= 0

Assemble to Order

:= TRUE

7312 Warehouse Entry

"Source Document"

:= "Source Document"::"Assembly Order" If "Source Document"::"Output Jnl."

:= "Source Document"::"Assembly Consumption" If "Source Document"::"Consumption Jnl."

"Source Type"

:= "Assembly Header"

:="Assembly Line" If "Source Document"=::"Assembly Consumption"

"Source No."

:= PostedAsmHeader."Order No."

"Source Subtype"

:= AsmHeader."Document Type"::Order

"Source Line No."

:= 0

:= PostedAsmLine."Line No." If "Source Document"=::"Assembly Consumption"

"Source Subline No."

:= 0

"Reference Document"

:= "Reference Document"::Assembly

"Reference No."

:= PostedAsmHeader."No."

"Whse. Document Type"

:= "Whse. Document Type"::Assembly

"Whse. Document No."

:= PostedAsmHeader."Order No."

"Whse. Document Line No."

:= "Source Line No."

7321 Whse Shipment Line

For the records in TempWhseShptLine table, change:

"Assemble to Order"

:= TRUE

"Qty to Ship"

:= 0

25001 Kit BOM Journal Line

Will be empty if precondition "Delete lines in the BOM journal" is met

25002 Kit Component

Will be empty if precondition "Delete lines in the BOM journal" is met

25003 Kit Sales Line Archive

25005 Kit Sales Invoice Line