MRP_GenerateDemandForKit Stored Procedure

<< Click to Display Table of Contents >>

Navigation:  iVend Database Database > Stored Procedures >

MRP_GenerateDemandForKit Stored Procedure

Navigation: iVend Database Database > Stored Procedures >

hm_btn_navigate_prevhm_btn_navigate_tophm_btn_navigate_next

iVend 6.6 Database Help

MRP_GenerateDemandForKit Stored Procedure

Collapse All Expand All

iVend Database Database : MRP_GenerateDemandForKit Stored Procedure

Properties

Creation Date

4/13/2015 12:00 PM

Encrypted

dbimages_boolean-false

Ansi Nulls

dbimages_boolean-true

Parameters

Parameter

Direction

Description

Data Type

Size

@MaxTfrLevel

In

 

SmallInt

2

@RETURN_VALUE

Return Value

 

Integer

4

Objects that depend on MRP_GenerateDemandForKit

 

Database Object

Object Type

Description

Dep Level

MRP procedure

MRP

Stored Procedure

 

1

Procedure Source Code

CREATE PROCEDURE [dbo].[MRP_GenerateDemandForKit](@MaxTfrLevel smallint)

As

Begin

Set NoCount On

Insert Into #ReceiptsDemands(DueDate, ProductKey, WarehouseKey, Quantity,

       HeaderKey, LineKey, ObjectId, Category, StockType, TfrLevel, OrderDate, OrderQty,

       ToWarehouseKey, ToWarehouseDueDate, RecordAddedByMRP)

Select StockInOut.DueDate - ItemWarehouse.LeadTime , InvKitComponent.ProductKey, StockInOut.WarehouseKey, (StockInOut.QtyCB * -1) * InvKitComponent.Quantity,

  0, 0, -1, 9, 'I', ItemWarehouse.TfrLevel, Null, 0,

  Null, Null, 0

From #StockInOut As StockInOut Inner Join #ItemWarehouse As ItemWarehouse On StockInOut.ProductKey = ItemWarehouse.ProductKey And StockInOut.WarehouseKey = ItemWarehouse.WarehouseKey

          Inner Join InvKitComponent On StockInOut.ProductKey = InvKitComponent.ParentProductKey

Where QtyCB < 0

And  ItemWarehouse.ReplenishmentMethod = 3

Set NoCount Off

End

See Also

Related Objects

iVend Database Database

 

 


© 2019 All Rights Reserved.

Send comments on this topic.