Ax2012 Enus Deviv 06 PDF
Ax2012 Enus Deviv 06 PDF
Ax2012 Enus Deviv 06 PDF
CHAPTER 6: USE AND DESIGN OF THE INVENTORY AND WAREHOUSE MANAGEMENT MODULE
Objectives
The objectives are: Describe how reservations and marking are used in the system. Review the inventory transactions and on hand inquiries. Describe the data model for inventory transactions and on hand inventory. Review the structure of the InventOnHand Class. Explain how inventory journals are used. Discuss the inventory journals data model and the structure of the InventJournalCheckPost classes. Describe how quarantine management and quality management are used in the system. Explain inventory blocking. Describe other functionality that is available in the Inventory and warehouse management module.
Introduction
The following sections explain the functionality offered by the Inventory and warehouse management module by describing a series of tasks that are performed by using the module. The following main tasks are supported by the Inventory and warehouse management module. Reservations and marking of inventory Maintenance of item transaction history and on hand inventory Inventory journal transactions such as cycle counts and adjustments Quarantine and quality management Other
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-1
Reservations Overview
There are two basic types of reservations in Microsoft Dynamics AX 2012 reserved physical and reserve ordered. A physical reservation is a hard allocation or reservation. When a transaction is physically reserved, the item is available in the warehouse and it is specifically set aside for the transaction(s) that it is reserved against. The reserve ordered type reservation is a soft allocation. This means the items are currently on order and those specific ordered items are reserved for a specific transaction. When the items are available in inventory, the reservation is changed from reserve ordered to reserved physical. For example, you have created a sales order for 100 widgets. The widgets are not available in inventory. However there are several open purchase orders for the item so that you can make an ordered reservation for the widgets against the sales order. After the widgets are received, the reservation can be updated to a physical reservation. There are three methods for making reservations in Microsoft Dynamics AX 2012. Manual: This type of reservations requires a user to manually select the items to be reserved. Automatic: This type of reservation is created by the system when you are creating transactions. Explosion: This type of reservation is designed specifically for Bill of Materials (BOM) products. The reservation is "exploded" or "expanded" to the line of the BOM not just the header.
6-2
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
Reservations Data Model
The data model for reserved inventory is the same as other types of inventory transactions. When inventory is reserved, the inventory transaction (InventTrans table record) is updated with an Issue status to indicate that the quantities are physically reserved or reserve ordered. Additionally, the InventDimFixed field is updated with the inventDimID for the dimension combination that the inventory is reserved against. The InventSum table is used to make sure that the reserved quantities are available. This requires that negative physical inventory is not allowed and it is controlled by the item model group that is specified on each released product. The control of the availability only considers the dimensions that are marked as part of the physical inventory. NOTE: For more information about the inventory transaction data model, refer to the "Inquiries and Transactions" topic in this course.
On hand
The quantity on hand (available quantity) is a key figure when you make decisions related to a specific item. This information can be supplemented by expected stock movements because of future purchases, production, or sales. One of the main purposes of the Inventory and warehouse management module is to supply this important information; many of the other functions described are intended to maintain this information.
Transactions
Historic transactions are an important source of information because they show all item movements. By knowing the current quantity of an item, and its historic transactions, you can calculate the quantity in stock for any historic date. You can also print an inventory list for a given date, even if the quantities have changed because of transactions after this date.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-3
6-4
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
The following figure shows the data model for inventory transactions.
InventTrans Relationships
The split of the InventTrans table affects code that uses the relationships between the inventory transaction originating tables and the inventory transaction table. The InventTransId field is removed from the InventTrans table and is replaced by the InventTransOrigin field to reference the InventTransOrigin table. Some inventory transaction originating tables keep the InventTransId field; however, the field cannot be used to reference the InventTrans table. All inventory transaction originating records must first be referenced by a record in the InventTransOrigin table that references the InventTrans table. The following code example shows how to do this.
while select inventTransOriginSalesLine where inventTransOriginSalesLine.SalesLineDataAreaId == salesLine.dataAreaId && inventTransOriginSalesLine.SalesLineInventTransId == salesLine.InventTransId join inventTrans where inventTrans.InventTransOrigin == inventTransOriginSalesLine.InventTransOrigin { info(inventTrans.toString()); }
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-5
InventMovement Class
The InventMovement class is used to wrap a record that is responsible for generating inventory transactions. Sales line, production table, and inventory journal line are examples of tables that hold this type of records. The concept is to make a common presentation of the data attributes and ignore the source. The InventMovement class is extended to cover additional functionality for each source. The following figure shows the class hierarchy for the InventMovement class.
The InventUpdate object requires an InventMovement object to specify which data to update. You can use the static method InventMovement::construct() to initialize the object for the actual record.
6-6
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
InventUpdate Class
You can use the InventUpdate class to make a specific change to the state of the data. Reservation, Pick, and Delivery are examples of state changes covered by this class. InventUpdate is extended to cover each update. The following figure shows the class hierarchy for the InventUpdate class.
The InventUpdate object is initialized with a specified InventMovement object. The specification of dimension values is specified as additional parameters, when the InventUpdate object is instantiated. When the object is initialized the object method updateNow() performs the update. Each InventUpd_ class has a series of static methods with a prefix new. They are used to initialize the object that has a specific set of parameters. The following pattern is typically used when you work with InventUpdate.
inventUpd_Reservation = InventUpd_Reservation::newMovement(movement, reservation, mayBeReduced); inventUpd_Reservation.updateNow();
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-7
FIGURE 6.4 INVENTSUM AND INVENTTRANS STATUS AND QUANTITY FIELD RELATIONSHIPS
Designs that use InventSum are preferred for performance reasons, because it prevents the summing of transactions during both the calculation of available quantities and the control of negative inventory. InventSum contains the sum of all inventory transactions. To calculate the inventory status on a date in the past, you first have to adjust the figures found in InventSum with the transactions updated after the date in question. The information in InventSum is updated every time that a transaction is committed. When you are in a transaction, the table will not reflect the changes that you made in the current transaction. If the InventOnHand class is used to fetch the data from InventSum, the changes from the current transaction will be included. Each record in InventTrans contains several dates. DateExpected: Expected date of the physical movement. DateInvent: Date the transaction is registered or picked on. DatePhysical: Date of the physical movement (product receipt, packing slip, or report as finished).
6-8
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
DateFinancial: Date of the financial movement (vendor invoice, sales order invoice, or ending of a production order). DateStatus: Date the inventory status (status issue or status receipt) is last updated. DateClosed: Date the transactions are financially closed on.
InventOnHand Class
The InventSum table contains consolidated figures for each item and dimension combination. The content of this table is redundant to the data in InventTrans. The reason for this design is to increase performance when calculating quantity on hand. InventOnHand class is used to wrap the InventSum table and should be used to retrieve the information. The class has several different static methods that are used to initialize the object. You can use the static method InventOnHand::newItemDim to retrieve the consolidated quantities for the specified dimension values. The following code sample shows how to call this method.
ItemId itemId; InventBatchId inventBatchId; InventDim inventDimCriteria; InventDimParm inventDimParm; InventOnHand inventOnHand; inventDimCriteria.clear(); inventDimCriteria.inventBatchId = inventBatchId; inventDimParm.clear(); inventDimParm.InventBatchIdFlag = NoYes::Yes; InventOnHand = InventOnHand::newItemDim(itemId, inventDimCriteria, inventDimParm); info(strFmt(The quantity available is %1, inventOnHand.availPhysical()));
InventDimOnHand Class
You can use the InventOnHand class to calculate consolidated figures for one specification of an item ID and a dimension combination. You can use the InventDimOnHand class to have individual figures for a more detailed specification, than the one being used to limit the query. The following sample shows how to obtain the physical quantity available for each item included on a specific inventLocationId and wmsLocationId.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-9
6-10
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
The costing method is determined by settings on the item model group for each product. Any number of costing methods can be used in a single installation. When a method other than standard costing is used, the system records transactions at the weighted average in real time. Then, a process that is known as Inventory close must be run periodically to make adjustments from the weighted average to the actual costing method. Additionally, the process makes settlements between the receipts and invoices. After this process is complete the inventory is stopped up to the date that inventory is closed for. This means that no additional transactions can be posted with a date earlier than the specified date. When the inventory close process is run, the system updates the transactions (inventTrans table records) with a new status in the ValueOpen field, records the closed date, and records any adjustments for each inventory transaction.
InventSettlement
When a withdrawal from inventory is updated financially, it will be assigned a cost value that is based on the current status of the inventory. Later, financial receipt updates could affect the originally calculated cost value. There is no automatic recalculation of the cost of goods sold for the update of the receipt.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-11
The InventTrans.costValue() method returns the current cost value that is the sum of the CostAmountPosted and CostAmountAdjustment fields. The InventSum.PostedValue field contains the consolidated cost value and includes all adjustments.
6-12
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
Inventory and Warehouse Management Integrations
The Inventory and warehouse management module is used to keep track of physical items. The following figure shows the interface with the other modules in Microsoft Dynamics AX 2012.
FIGURE 6.6 INVENTORY AND WAREHOUSE MANAGEMENT INTERACTIONS WITH OTHER MODULES
Items are bought through the Procurement and sourcing module or produced in the Production control module. Items are consumed by sales orders, projects or production orders. The Ledger module keeps track of inventory value and consumption costing.
Inventory Journals
The primary way that inventory is updated in Microsoft Dynamics AX is through sales orders, purchase orders, and production orders. Inventory journals are an alternative that you can use to make manual updates to the inventory. Several types of journals can be used to make updates. Each inventory journal consists of a header and lines. The header defines the journal information that is configured on the journal name. These inventory journal names resemble the journal names and types that are defined in the General ledger module. The journal lines are used to define the items, dimensions, and quantities. Each type of journal has small differences. However, the main principle is that the journal has inventory transactions in the inventTrans table that are used to add or remove inventory.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-13
Movement
A movement is an update of a receipt or withdrawal of a specified quantity without a related purchase, production, or sales order. This type of journal offers additional control so that users can specify a main account that the inventory cost is offset to.
Inventory Adjustment
An adjustment is made when a deviation is found between the physical inventory and the quantity registered in Microsoft Dynamics AX 2012. A loss could also be relevant if some items in stock are damaged or destroyed.
Counting
Counting is a special version of an adjustment, because the quantity entered is the physical quantity counted. In a typical inventory adjustment journal, the change in quantity is entered.
Transfer
A transfer is used when a lot is moved from one warehouse to another. The same function is also used to change other inventory dimensions, such as batch ID, serial ID, pallet, or warehouse location. Additional journal types are available for item arrivals, production input, and tag counting. For more information about other journal types, refer to the Help.
6-14
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
Inventory Journal Data Model
The following figure displays the data model that is used for inventory journals.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-15
6-16
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
Challenge Yourself!
Use the provided information to create a new class that has a dialog box that has two parameters for selecting a file and a journal name. Add logic to the OK button in the dialog box to open the selected file and create a new movement journal header by using the journal name that is specified in the dialog box. Each line of the spreadsheet must be imported into the journal lines. When the file is finished processing, the users should receive an Infolog informing them of the journal number.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-17
Step by Step
TIP: The code samples for this lab can be found in the AX2012_ENUS_DEVIV_06_01_LAB_CODE.txt file. You can copy and paste these code samples into the correct methods. Follow these steps to create a new project. 1. 2. 3. 4. 5. 6. Open the Development workspace. Open the Projects window. Right-click the Shared node and then click New > Project. Right-click the new project and select Rename. Enter a name for the project such as ImportBeginningBalancesLab. Double-click the project to open it, and then close the Projects window.
To create a new class that is copied from the Run Base Batch Tutorial, follow these steps. 1. In the AOT window, browse to Classes > Tutorial_RunbaseBatch. 2. Right-click the class and click Duplicate. 3. Right-click the CopyOfTutorial_RunbaseBatch class that is created and click Rename. 4. Enter a name for the class such as ImportBeginningBalances. 5. Save the class. 6. Drag the new class into the project created earlier. 7. Save the project.
6-18
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
To update the code in the class for the dialog to importing beginning balances, follow these steps. 1. Locate the ImportBeginningBalances class and then right-click and choose View Code. 2. In the classDeclaration method, add variables for the packed variables, Microsoft Office Excel objects, and the dialog fields. Use the following code sample to guide you. class ImportBeginningBalances extends RunBaseBatch { // Packed variables FilenameOpen fileNameOpen; TutorialJournalNameId inventJournalNameId; // Excel objects SysExcelApplication SysExcelWorkbooks SysExcelWorksheets SysExcelWorksheet SysExcelCells // Dialog fields DialogField DialogField oSysExcelApplication; oSysExcelWorkbooks; oSysExcelWorksheets; oSysExcelWorksheet; oSysExcelCells; dlgFileNameOpen; dlgInventJournalNameId;
#define.CurrentVersion(1) #define.Version1(1) #localmacro.CurrentList fileNameOpen, inventJournalNameId #endmacro } 3. Modify the construct method to create a new instance of the ImportBeginningBalances class. Use the following code sample to guide you. server static ImportBeginningBalances construct() { return new ImportBeginningBalances(); } 4. Update the description of the class. Use the following code sample to guide you.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-19
6-20
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
return super(); } To add validation, a progress indicator, and logic to import the file, follow these steps. 1. To add validation to the class, modify the validate method. Use the following code sample to guide you. public boolean validate(Object _calledFrom = null) { boolean ret = true; //Add validation to the class to verify that the two fields on the dialog box are populated with a value. if (!fileNameOpen) { ret = checkFailed("Invalid file name."); } if (!inventJournalNameId) { ret = checkFailed("Invalid invent journal name Id."); } return ret; } 2. Add the following code that is used to initialize the objects for importing a spreadsheet in the init method. public boolean init() { ; // If spreadsheet document doesn't exist, then quit if (! winAPI::fileExists(fileNameOpen)) { throw error(strfmt("File '%1' doesn't exist or is currently open.", fileNameOpen)); } // Start excel & turn off alerts oSysExcelApplication = SysExcelApplication::construct(); oSysExcelApplication.displayAlerts(false); oSysExcelWorkbooks = oSysExcelApplication.workbooks(); // Try to open the file try { oSysExcelWorkbooks.open(fileNameOpen); }
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-21
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
journalTableData.journalStatic().newJournalTransData(journalTrans,journalTa bleData); // Try to open Outputs worksheet oSysExcelWorksheet = oSysExcelWorksheets.itemFromName(#SP_OUTPUT_WORKSHEET); if (oSysExcelWorksheet == null) { throw error(strfmt("No 'Outputs' worksheet in file '%1'.", fileNameOpen)); } // Try reading values from outputs worksheet try { // Init journalTable journalTable.JournalId = journalTableData.nextJournalId(); journalTable.JournalType = InventJournalType::Movement; journalTable.JournalNameId = inventJournalNameId; journalTableData.initFromJournalName(journalTableData.journalStatic().findJ ournalName(journalTable.JournalNameId)); oSysExcelCells = oSysExcelWorksheet.cells(); while (startRow <= #SP_END_ROW) { journalTrans.clear(); journalTransData.initFromJournalTable(); journalTrans.TransDate = oSysExcelCells.item(StartRow, #SP_READ_TRANSDATE_COLUMN).value().date(); journalTrans.ExItemId = this.cell2String(StartRow, #SP_READ_ITEMID_COLUMN); journalTrans.ExCostAmount = oSysExcelCells.item(StartRow, #SP_READ_COST_COLUMN).value().double(); journalTransData.create(); StartRow ++; } journalTable.insert(); } catch { throw error("Reading values from Excel file failed."); } }
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-23
6-24
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
7. Modify the run method to execute the logic you created in the startProgress, init, readAll, and exitExcel methods. Use the following code sample to guide you. /// <summary> /// Contains the code that does the actual job of the class. /// </summary> public void run() { #OCCRetryCount if (! this.validate()) throw error(""); try { ttsbegin; this.startProgress(); this.init(); this.readAll(); this.exitExcel(); ttscommit; } catch (Exception::Deadlock) { retry; } catch (Exception::UpdateConflict) { if (appl.ttsLevel() == 0) { if (xSession::currentRetryCount() >= #RetryNum) { this.exitExcel(); throw Exception::UpdateConflictNotRecovered; } else { retry; } } else { this.exitExcel(); throw Exception::UpdateConflict; } } catch (Exception::Error) {
6-25
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Test
To create a new menu item and put it on the main menu in the Inventory and warehouse management module under the Periodic folder, follow these steps. 1. In the AOT window, expand Menu Items. 2. Right-click Action, and then click New Menu Item. 3. In the Properties window, set the following values. a. Name = ImportBeginningBalances b. Label = Import beginning balances c. HelpText = Tutorial to import beginning balances into a movement journal. d. ObjectType = Class e. Object = ImportBeginningBalances 4. Save the menu item. 5. Drag the new menu item into the project that you created earlier. 6. In the AOT window, browse to Menus > InventoryAndWarehouseManagement. 7. Drag the menu into the project that you created earlier. 8. In the Project window, browse to the Periodic folder of the InventoryAndWarehouseManagement menu. 9. Drag the ImportBeginningBalances menu item into the Periodic folder and place it below the Inventory blocking menu item. 10. Save the menu and the project. To create a new journal name to be used for the import, follow these steps. 1. In the AOT window, browse to Forms > tutorial_JournalName. 2. Right-click the form and then click Open. 3. Create a new record and enter the following information. a. Name = IMov b. Description = Inventory Movement c. Journal type = Movement d. Voucher series = Inve_72 4. Close the Journal names form.
6-26
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
To test the new menu item and import process, follow these steps. 1. Close the Microsoft Dynamics AX 2012 client. 2. Open a new Microsoft Dynamics AX 2012 client. 3. Open Inventory and warehouse management > Periodic > Import beginning balances. 4. Verify that your dialog box looks similar to the following figure.
5. Click the yellow folder icon and browse to the AX2012_ENUS_DEVIV_06_01_LAB_SAMPLEFILE.xlsx file. 6. Click Open in the Windows Explorer window to open the file. 7. In the Name drop-down box, select IMov. 8. Click OK. 9. Notice the progress indicator while file imports. When the process is finished the progress bar will disappear to indicate the process is finished. To view the journal that was imported, follow these steps. 1. Open the Development Workspace. 2. In the AOT window, browse to Forms > tutorial_JournalTable. 3. Right-click the form and select Open.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-27
TIP: You can repeat the test as many times as you would like. The journal number and voucher numbers will automatically increment during each import. TIP: You can import the AX2012_ENUS_DEVIV_06_01_LAB_SOL.xpo file to verify and compare your solution. NOTE: This lab uses the Microsoft Dynamics AX 2012 Tutorial tables, classes, and forms. In a more realistic implementation, you should create your own tables, forms, and classes.
6-28
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
Quarantine Orders
The quarantine function is used to block a specific lot. When the quarantine is started, the quantity is removed from available inventory. Later, when the quarantine is ended, the quantity is returned to available inventory. One use of this function is to block a received lot until it has passed quality assurance. The InventMov_Quarantine class is used when you work with inventory quarantine orders to control items that are in the InventQuarantineOrder table quarantine. Quarantine orders differ from other types of orders such as purchase orders or sales orders because they do not have a header and line data structure.
Quality Orders
You can use quality orders to identify the tests and to record test results and test quantity for a specific item. The tests are copied from the test group that is assigned to the quality order. Tests can be added, deleted, or changed. A quality order can be manually created or automatically generated based on rules that are defined in the Quality associations form found in Inventory and warehouse management > Setup > Quality control. A quality order is associated with an item in a sales order, a purchase order, a quarantine order, a production order, a production order routing operation, or an on-hand inventory balance. Items that are specified for inspection in a quality order are automatically blocked from issue or consumption. Each quality order is stored in the InventQualityOrder table. The lines of the quality order represent each test to be performed and stored in the InventQualityOrderLine table. Each test or quality order line can have test results recorded for it that are stored in the InventQualityOrdersLineResults table. The InventQualityManagementCreate class provides the facilities for quality management order generation.
Inventory Blocking
Inventory blocking is part of the quality inspection process. During the quality inspection, items are automatically blocked from consumption or issue. Also, you can manually block items that you want to prevent from being issued or consumed.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-29
6-30
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
The InventMov_Blocking class is a specialized InventMovement class version responsible for handling inventory blockings. The InventBlockingTableType class wraps various properties of the different inventory blocking types and callers. The InventBlockingQualityOrderSync class provides methods to synchronize inventory blocking and related quality orders.
Other Functionality
The Inventory and warehouse management module has many additional features. The following topics review the forecasting and transfer order functionality.
Forecasts
Forecasts are used to enter sales and purchases expected in the future. By forecasting you can plan for the future beyond the period covered by received sales orders and created purchase orders. For example, forecasts are necessary when a manufacturing companys production lead time is longer than the orderto-delivery time that it offers customers. A forecast model is used to name and identify a specific forecast. You can define a forecast model in two levels. A forecast model can include one or more submodels. This allows you to aggregate the individual forecasts. When you run forecast scheduling for a top-level forecast model, the program calculates gross requirements for all models that are designated as submodels. All forecast models must be defined before you can designate one or more models as submodels of a forecast model. A forecast model that is used as a submodel cannot contain other submodels. A forecast submodel uses its own parameters, not those of the toplevel forecast model.
There are several types of forecasts available in Microsoft Dynamics AX 2012 including demand, supply, item, and expense forecasts.
Transfer Orders
A transfer between two warehouses can be updated by using a transfer journal as mentioned earlier. However, when a journal is updated, the issue and receipt are updated at the same time. If there is a time lag between the issue and the receipt because of transport time, this can be reflected by creating a transfer order. Transfer orders differ from transfer journals because shipping and receiving actions must be completed. They also allow for multiple shipments and receipts against the same order.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-31
6-32
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
Challenge Yourself!
Use the provided information to create a new table to track the history of cleared inventory blocking records. Add new fields to this table to store the user ID and the cleared date and time. Modify the functionality of the Delete button on the Inventory blocking form to copy the blocking record to the new inventory blocking history table.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-33
To create new extended data types for the new inventory blocking history table, follow these steps. 1. In the AOT window, browse to Data Dictionary > Extended Data Types. 2. Right-click Extended Data Types, and then click New > Enum. 3. In the Properties window for the new enum, set the following values. a. Name = InventBlockingClearedFlag b. Label = Cleared c. HelpText = Inventory blocking is cleared when selected. d. Extends = NoYesId e. EnumType = NoYes 4. Save the extended data type, and then drag it into the project that you created earlier. 5. Right-click Extended Data Types, and then click New > UtcDateTime. 6. In the Properties window for the new extended data type, set the following values. a. Name = ClearedDateTime b. Label = Cleared date time c. HelpText = Date and time the inventory blocking was cleared. 7. Save the extended data type, and then drag it into the project that you created earlier. 8. Save the project.
6-34
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
To create a new inventory blocking history table, follow these steps. 1. In the AOT window, browse to Data Dictionary > Tables > InventBlocking. 2. Right-click the InventBlocking table and then click Duplicate. 3. In the Properties window, set the following values. a. Name = InventBlockingHistory b. Label = Inventory blocking history c. CreatedDateTime = No d. CreatedBy = No 4. Save the table, and then drag it into the project that you created earlier. 5. Save the project. 6. Expand the Fields node of the InventBlockingHistory table. 7. Drag the InventBlockingClearedFlag and ClearedDateTime extended data types into the Fields node. 8. Set the AllowEdit property on each of the fields to No. 9. Right-click the Fields node and then click New > String. 10. In the Properties window, set the following values. a. Name = ClearedBy b. Label = Cleared by c. HelpText = User that cleared the inventory blocking. d. AllowEdit = No e. ExtendedDataType = UserId 11. Right-click the Fields node and then click New > String. 12. In the Properties window, set the following values. a. Name = origCreatedBy b. Label = Created by c. HelpText = User that created the inventory blocking. d. AllowEdit = No e. ExtendedDataType = UserId 13. Right-click the Fields node and then click New > UtcDateTime. 14. In the Properties window, set the following values. a. Name = origCreatedDateTime b. AllowEdit = No c. ExtendedDataType = CreatedDateTime 15. Right-click the Field Groups node and then click New Group.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-35
6-36
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
10. Right-click the InventBlockingForm query under the Data Sources node and select Delete. 11. Select Permanately delete, and then click OK, to confirm the deletion. 12. Select the InventBlocking data source, and set the following properties. a. Table = InventBlockingHistory. b. AllowEdit = No c. AllowCreate = No d. AllowDelete = No 13. Select the Design node of the form and set the Caption property to Invent blocking history. 14. In the form, browse to Designs > Design > ActionPane:ActionPane > ActionPaneTab:ActionPaneTab, and then remove the ButtonGroup:RecordBasics. 15. In the form, browse to Designs > Design > Group:Body > Group:DetailsContainer > Tab:DetailsTab > TabPage:General, and then set the Columns property to 3. 16. Right-click the top node of the InventBlockingHistory form and select Restore. 17. Drag the InventBlockingClear field group from the Fields node of the InventBlocking data source on the form into the TabPage:General section and put it below the Group:History group. 18. Save the form. 19. In the Project window, select the InventBlockingHistory table, and set the FormRef property to InventBlockingHistory. To create a new menu item and to add the menu item to the menu, follow these steps. 1. In the AOT window, expand Menu Items. 2. Right-click Display, and then click New Menu Item. 3. In the Properties window, set the following values. a. Name = InventBlockingHistory b. Label = Inventory blocking history c. HelpText = View inventory blocking history. d. ObjectType = Form e. Object = InventBlockingHistory 4. Save the menu item. 5. Drag the new menu item into the project that you created earlier.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-37
6-38
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
3. Create a new find method on the table that is used to find inventory blocking history table records. Use the following code sample to guide you. /// <summary> /// Finds the specified record in the <c>InventBlockingHistory</c> table. /// </summary> /// <param name="_inventBlockingHistory"> /// The ID of the record to find. /// </param> /// <param name="_forUpdate"> /// A Boolean value that indicates whether to read the record for update; optional. /// </param> /// <returns> /// A record in the <c>InventBlocking</c> table if it exists; otherwise, an empty record. /// </returns> public static InventBlockingHistory find( RecId _inventBlockingHistory, boolean _forUpdate = false) { InventBlockingHistory inventBlockingHistory; inventBlockingHistory.selectForUpdate(_forUpdate); select firstonly inventBlockingHistory where inventBlockingHistory.RecId == _inventBlockingHistory; return inventBlockingHistory; } 4. Create a new method on the table that overrides the initValue method. This method should set the values for the new fields that were added to the table. Use the following code sample to guide you. /// <summary> /// Initializes default inventory blocking history values. /// </summary> public void initValue() { this.InventBlockingClearedFlag = NoYes::Yes; this.ClearedBy = curUserId(); this.ClearedDateTime = DateTimeUtil::utcNow(); } 5. In the AOT window, browse to Classes > InventBlockingTableType. 6. Drag the class into the project that you created earlier.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-39
6-40
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
3. Open Inventory and warehouse management > Periodic > Inventory blocking. 4. Create a new record by clicking New. 5. Select an item number such as 1005. 6. Enter a description such as Test. 7. Select a configuration such as HD, a size such as 50, and a color such as 02. 8. Save the record by pressing Ctrl+S. 9. Click Delete. 10. Close the Inventory blocking form. 11. Open Inventory and warehouse management > Inquiries > Quality management > Inventory blocking history. 12. Notice the inventory blocking record that you just created. Your results should look similar to the following figure.
TIP: You can repeat the test as many times as you would like by using different item numbers and dimensions. The only requirement is that the item and dimension combination that you select must be on hand. TIP: You can import the AX2012_ENUS_DEVIV_06_02_LAB_SOL.xpo file to verify and compare your solution.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-41
Summary
The Inventory and warehouse management module in Microsoft Dynamics AX 2012 integrates with many other modules and is the central module for processing inventory transactions. The module includes functionality for recording and updating the inventory transactions and keeping track of the on hand quantities for every item and itemdimension combination. The inventory closing process provides functionality to revalue the inventory from the weighted average to the selected inventory costing method that is specified on each item. Inventory journals can be used to make manual adjustments to the inventory values by adding, removing, or counting the current on hand inventory values. You can also make transfers by using an inventory journal or by creating a transfer order. Finally, quarantine and quality management features can be used to record test results and prevent items from being processed because of quality issues.
6-42
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
2. Match the inventory statuses with the correct inventory status field. Categories (Inventory Statuses): 1. Status Issue 2. Status Receipt _____ Item 1: Ordered _____ Item 2: OnOrder _____ Item 3: ReservOrdered _____ Item 4: Received _____ Item 5: Purchased _____ Item 6: Deducted _____ Item 7: Picked _____ Item 8: Sold 3. TRUE or FALSE? The InventJournalCheckPost class handles the validation and posting of a purchase order. ( ) TRUE ( ) FALSE
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-43
6-44
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
2.
3.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-45
Solutions
Test Your Knowledge
1. Describe the difference between the inventTrans table and the inventSum table. MODEL ANSWER: The inventTrans table stores the details of every inventory issue and receipt, whereas the inventSum table stores the summation of all inventTrans records grouped by the inventory dimension combinations which are identified by the inventDimID. 2. Match the inventory statuses with the correct inventory status field. Categories (Inventory Statuses): 1. Status Issue 2. Status Receipt 2 1 1 2 2 1 1 1 Item 1: Ordered Item 2: OnOrder Item 3: ReservOrdered Item 4: Received Item 5: Purchased Item 6: Deducted Item 7: Picked Item 8: Sold
3. TRUE or FALSE? The InventJournalCheckPost class handles the validation and posting of a purchase order. ( ) TRUE () FALSE 4. Which of the following stores the original cost value for an inventory transaction in the InventTrans table? ( ) InventTrans.CostValue() method ( ) InventTrans.CostAmountAdjusted field ( ) InventTrans.CostAmountPhysical field () InventTrans.CostAmountFinancial field
6-46
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Chapter 6: Use and Design of the Inventory and Warehouse Management Module
5. Which of the following are types of reservations available in Microsoft Dynamics AX 2012? (Select all that apply) () Reserved physical () Reserve ordered ( ) Sales reservation ( ) Purchase reservation
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
6-47
6-48
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement