Customizing The Lot Expiration Date

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Oracle Process Manufacturing

Customizing the Lot Expiration Date Release 12.0.2


Part No. E10529-01 August 2007

This document covers the Lot Expiration Date calculation using a custom PL/SQL routine in the Oracle Process Manufacturing Process Execution. This chapter covers the following topics: Customizing the Lot Expiration Date To calculate a custom lot expiration date and update lot attributes:

Customizing the Lot Expiration Date


You can define a lot expiration date by writing a custom PL/SQL routine in the INV_CUST_CALC_EXP_DATE.get_custom_lot_expiration_date API. Without customization, the expiration date is calculated by adding the shelf life days to the origination date. If you customize the PL/SQL routine to return a new date, then that date is used for calculating the lot expiration date. The custom lot expiration date calculation is applicable to items with Lot Expiration Control set to Shelf-Life Days. Refer to the Inventory Attribute Group topic in Oracle Inventory User's Guide for more information on how to set up lot expiration (shelf life) control. Custom lot expiration lets you: Calculate the lot expiration date in Oracle Process Manufacturing (OPM) Process Execution when a lot is yielded for the first time on these windows: WIP Transaction Create Material Transaction Correct Material Transaction Material Exception Create Pending Lots on Mobile Supply Chain Application (MSCA)

Calculate the lot expiration date in Oracle Inventory and Purchase Order (PO)

Copyright 2007, Oracle. All rights reserved. Oracle, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

transactions, such as: Miscellaneous Receipts Alias Receipts PO Receipts

Update the following lot attributes in the Lot Master window in OPM Process Execution: Expiration Date Hold Date Retest Date Expiration Action Code Expiration Action Date Lot Attributes DFF

Prerequisite
Ensure that the Lot onhand quantity is zero, and that the Lot Origination date is Null. This lets you update lot attributes when the lot is yielded for the first time.

Responsibilities
Oracle Inventory Production Supervisor

To calculate a custom lot expiration date and update lot attributes:


1. 2. 3.

Navigate to the Lot Master window to define a lot. Select Shelf-Life Days for Lot Expiration control. Define the lot expiration date, in the INV_CUST_CALC_EXP_DATE.get_custom_lot_expiration_date procedure by editing the PL/SQL routine. Use the appropriate date calculation logic for your implementation. This procedure appears as follows prior to editing and recompilation:

PROCEDURE get_custom_lot_expiration_date (p_lot_rec IN MTL_TRANSACTION_LOTS_TEMP%ROWTYPE, p_mtl_trx_line_rec IN MTL_MATERIAL_TRANSACTIONS_TEMP%ROWTYPE, x_lot_expiration_date OUT NOCOPY DATE, x_return_status OUT NOCOPY VARCHAR2) IS BEGIN x_return_status := FND_API.G_RET_STS_SUCCESS; /* Put the custom code here to calculate the lot expiration date. If custom logic is not required for the calculating lot expiration date then return lot expiration date as NULL */ END get_custom_lot_expiration_date;

If the custom API returns Null, then the lot expiration date is calculated by adding the shelf life days to the origination date.
4.

Override the following API parameters:


p_mtli_lot_rec = Mtl_transaction_lots_interface row type p_mti_trx_rec = Mtl_transactions_interface row type p_mtlt_lot_rec = Mtl_transaction_lots_temp row type p_mmtt_trx_rec = Mtl_material_transactions_temp row type If p_table is equal to: 1 - Interface table is populated 2 - Temp table is populated x_lot_expiration_date = Out parameter of custom logic which returns the date to be used as lot expiration date x_return_status = Out return status parameter

Note: Based on transaction type, a subset of all columns in the

aforementioned tables contains the data.

Reference
Refer bug 5209065 for additional information.

TTY Access to Oracle Support Services


Oracle provides dedicated Text Telephone (TTY) access to Oracle Support Services within the United States of America 24 hours a day, seven days a week. For TTY support, call 800.446.2398.

Documentation Accessibility
Our goal is to make Oracle products, services, and supporting documentation accessible, with good usability, to the disabled community. To that end, our documentation includes features that make information available to users of assistive technology. This documentation is available in HTML format, and contains markup to facilitate access by the disabled community. Accessibility standards will continue to evolve over time, and Oracle is actively engaged with other market-leading technology vendors to address technical obstacles so that our documentation can be accessible to all of our customers. For more information, visit the Oracle Accessibility Program Web site at http://www.oracle.com/accessibility/ .

Accessibility of Code Examples in Documentation


Screen readers may not always correctly read the code examples in this document. The conventions for writing code require that closing braces should appear on an otherwise empty line; however, some screen readers may not always read a line of text that consists solely of a bracket or brace.

Accessibility of Links to External Web Sites in Documentation


This documentation may contain links to Web sites of other companies or organizations that Oracle does not own or control. Oracle neither evaluates nor makes any representations regarding the accessibility of these Web sites.

Legal Notices
The Programs (which include both the software and documentation) contain proprietary information; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly, or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited. The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. This document is not warranted to be error-free. Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose. If the Programs are delivered to the United States Government or anyone licensing or using the Programs on behalf of the United States Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the Programs, including documentation and technical data, shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement, and, to the extent applicable, the additional rights set forth in FAR 52.227-19, Commercial Computer Software--Restricted Rights (June 1987). Oracle Corporation, 500 Oracle Parkway, Redwood City, CA 94065. The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup, redundancy and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and we disclaim liability for any damages caused by such use of the Programs. The Programs may provide links to Web sites and access to content, products, and services from third parties. Oracle is not responsible for the availability of, or any content provided on,

third-party Web sites. You bear all risks associated with the use of such content. If you choose to purchase any products or services from a third party, the relationship is directly between you and the third party. Oracle is not responsible for: (a) the quality of third-party products or services; or (b) fulfilling any of the terms of the agreement with the third party, including delivery of products or services and warranty obligations related to purchased products or services. Oracle is not responsible for any loss or damage of any sort that you may incur from dealing with any third party.

You might also like