Attribute values - Intergraph Smart Materials - Version 2020 (10.0) - Customization & Programming - Hexagon

Intergraph Smart Materials Classic API Configuration (2020)

Language
English
Product
Intergraph Smart Materials
Subproduct
Classic
Search by Category
Customization & Programming
Smart Materials/Smart Reference Data Version
2020 (10.0)

You can reserve specific materials based on their attribute values, for example, if you want to reserve materials needed for shop, field, or installation.

Some information related to usage or destination of material is not a property of the component, but a property of the BOM position. For example, if a component is a shop, field, or installation component, this is indicated by a BOM property. The property (attribute) values are evaluated so that a list of attributes and values per work package can be passed. Smart Materials translates the attributes and values into a Where condition for list positions.

Implementation

The wp_array is a PL/SQL table with two dimensions inside the API. The content of this PL/SQL table is passed into the function write_fa_header and the values are stored in a database table M_API_ATTRS to track the data.

Here is an extract of the function specification:

TYPE attr_rec IS RECORD

( attr_code m_attrs.attr_code%TYPE,

attr_value m_attr_values.attr_value%TYPE );

TYPE attr_array IS TABLE OF attr_rec INDEX BY BINARY_INTEGER;

TYPE wp_rec IS RECORD

( WP_ID m_work_packs.wp_id%TYPE

,WP_CODE m_work_packs.wp_code%TYPE

,WP_TYPE m_work_packs.wp_type%TYPE DEFAULT 'S'

,LOCKED_IND m_work_packs.locked_ind%TYPE DEFAULT 'N'

,PRIORITY_TYPE m_work_packs.priority_type%TYPE DEFAULT 'WP'

,M_USR_ID m_work_packs.m_usr_id%TYPE

,ATTR_CODE m_attrs.attr_code%TYPE

,AQC1_CODE m_adm_query_conds.aqc_code%TYPE

,AQC2_CODE m_adm_query_conds.aqc_code%TYPE

,AQC3_CODE m_adm_query_conds.aqc_code%TYPE

,AQC4_CODE m_adm_query_conds.aqc_code%TYPE

,AQC5_CODE m_adm_query_conds.aqc_code%TYPE

,ORDER_SEQ m_wp_to_fahs.order_seq%TYPE

,ROS_DATE m_wp_to_fahs.ros_date%TYPE

,ATTR_SORT m_wp_to_fahs.attr_sort%TYPE

,API_CC_TAB cc_array

,API_ATTR_TAB attr_array);

TYPE wp_array IS TABLE OF wp_rec INDEX BY BINARY_INTEGER;

Here are examples of incoming values:

p_wp(1).api_attr_tab(1).attr_code := 'UNIT_SECT';

p_wp(1).api_attr_tab(1).attr_value := 'HUMBUG';

p_wp(1).api_attr_tab(2).attr_code := 'PURC_DEST';

p_wp(1).api_attr_tab(2).attr_value := 'HH';

p_wp(1).api_attr_tab(3).attr_code := 'DES_AREA';

p_wp(1).api_attr_tab(3).attr_value := 'SCHWARZ';

To limit the forecast run/reservation run to the incoming values, a Where condition (for list positions) is automatically generated and attached to the generated work package.

AssignWorkPackages1

The following is the MV_WHERE view created for the Where condition:

CREATE OR REPLACE FORCE VIEW M_SYS.MV_WHERE_10000000516 (IDENT, LN_ID, LP_ID, RLI_ID)

AS

SELECT NULL, NULL, TAB_3.LP_ID, NULL FROM

MVP_LIST_POS TAB_3,

MVP_LIST_POS_VALUES TAB_101,

MVP_API_ATTRS A_101,

MVP_LIST_POS_VALUES TAB_102,

MVP_API_ATTRS A_102,

MVP_LIST_POS_VALUES TAB_103,

MVP_API_ATTRS A_103,

SYS.DUAL

WHERE 1 = 1

AND TAB_101.ATTR_ID = 500195

AND TAB_101.LP_ID = TAB_3.LP_ID

AND TAB_101.ATTR_ID = A_101.ATTR_ID

AND TAB_101.ATTR_VALUE = 'HUMBUG'

AND TAB_102.ATTR_ID = 500342

AND TAB_102.LP_ID = TAB_3.LP_ID

AND TAB_102.ATTR_ID = A_102.ATTR_ID

AND TAB_102.ATTR_VALUE = 'HH'

AND TAB_103.ATTR_ID = 500252

AND TAB_103.LP_ID = TAB_3.LP_ID

AND TAB_103.ATTR_ID = A_103.ATTR_ID

AND TAB_103.ATTR_VALUE = 'SCHWARZ'

The incoming values are stored in the M_API_ATTRS table.