SAMPLE_FNC_MDET_DERIV - Intergraph Smart Materials - Version 10.2 - Customization & Programming - Hexagon

Intergraph Smart Materials Customization (10.2)

Language
English
Product
Intergraph Smart Materials
Subproduct
Classic
Search by Category
Customization & Programming
Smart Materials/Smart Reference Data Version
10.2

Description:

This is a sample of function that can be used to build function-based derivation rules for milestone labels. They will be recognized by the LOV on the Function Code field in Window 2 of P.10.61 Milestone Labels and in Planning Setup, because of its specific signature.

Sample function sample_fnc_mdet_deriv illustrates the signature that is mandatory for a function that is to be used by function based derivation rules for typed milestone labels (this is, milestone labels the type of which is defined in P.10.61 Milestone Labels or in Planning Setup).

Parameters:

p_mdet_id        IN m_ms_details.mdet_id%TYPE

The primary key value of the detail milestone for which a date is to be calculated.

p_plan_item_type IN VARCHAR2

Type of the underlying planning item. For planned requisitions (database table m_eng_comm_items) the value 'ECI' is passed, for planned tagged items (database table m_eng_non_comm_items) the value is 'ENCI'.

p_date_type      IN VARCHAR2

Type of date that is to be calculated. Possible values are 'SCHEDULED' which refers to the planned date of the milestone denoted by p_ms_id, 'PLANNED' which refers to its forecasted date (sic!), and 'ACTUAL' which refers to its actual date.

p_plan_item_id   IN NUMBER

Primary key value of the underlying planning item. Depending on the value of parameter p_plan_item_type, this refers to m_eng_comm_items.eci_id or m_eng_non_comm_items.enci_id.

p_ms_id          IN m_milestones.ms_id%TYPE

The primary key value of the milestone which the detail milestone denoted by parameter p_mdet_id belongs to.

p_mset_id        IN m_ms_sets.mset_id%TYPE

The primary key value of the milestone set (see P.10.62 Milestone Sets or Planning Setup) assigned to the planning item (which includes the milestone label of the milestone denoted by parameter p_ms_id).

p_mc_id          IN m_ms_configs.mc_id%TYPE

The primary key value of the milestone label (see P.10.61 Milestone Labels or Planning Setup) that defines the characteristics of the milestone denoted by parameter p_ms_id.

p_pk_type        IN m_ms_details.pk_type%TYPE

Corresponds to the type of the milestone label denoted by p_mc_id (as defined in P.10.61 Milestone Labels or Planning Setup) and thus reflects the type of object represented by the detail milestone denoted by p_mdet_id. Currently, the following values are supported:

     R    - Engineering requisitions, database table m_reqs

     RLI  - Requisition line items, database table m_req_line_items

     INQ  - Inquiries, database table m_inquiries

     PBM  - Pre-bid meetings, database table m_pre_bid_meetings

     QS   - Quote summaries, database table m_quote_summaries

     QD   - Quote details, database table m_quote_details

     POH  - Agreements/purchase orders, database table m_po_headers

     POLI - Purchase order line items, database table m_po_line_items

     ISH - Item shipments, database table m_item_ships

p_pk_id          IN m_ms_details.pk_id%TYPE

The primary key value of the object represented by the detail milestone denoted by p_mdet_id. Thus, if p_pk_type is passed as 'R', p_pk_id corresponds to m_reqs.r_id; if p_pk_type is passed as 'POLI', p_pk_id corresponds to m_po_line_items.poli_id, and so forth.

p_mssp_id        IN m_milestones.mssp_id%TYPE

The primary key value of the supplement milestone plan that the milestone denoted by p_ms_id belongs to. If passed as NULL, then p_ms_id is part of the overall milestone plan of the planning item denoted by p_plan_item_type and p_plan_item_id.

Type:

Function

Usage:

Planning, P.60.01, P.60.03, P.60.05

Event:

Click Calculate Forecasted or Calc All Forecasted on P.60.01, P.60.03, or P.60.05, or select Recalculate Planning Dates or Recalculate Forecasted Dates on the Planning screen. Particularly on every database commit that updates a date column of a ‘trackable’ table in the database.

Default:

TRUNC(SYSDATE)

If p_pk_type='R' (Engineering Requisition):

planned date = date of requisition creation plus two weeks

forecasted date = date of requisition approval (if available) plus two days

actual date = requisition ‘release to procurement’ date