A.5 Table: m_po_line_items, Package: m_api_poli - Intergraph Smart Materials - Version 10.3 - Customization & Programming - Hexagon

Intergraph Smart Materials Classic API Configuration (10.3)

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

A.5.1 Procedure: upd_poli

Argument Name

Type

In/Out

P_US_ID

NUMBER(12)

IN

P_POLI_ID

NUMBER(12)

IN

P_COL_ARR

RECORD

IN

COL_NAME

TABLE OF VARCHAR2(255)

IN

COL_VALUE

TABLE OF VARCHAR2(255)

IN

P_RESULT

VARCHAR2

OUT

P_COMMIT_IND

VARCHAR2

IN; DEFAULT ‘Y’

Column Name

Prompt on P.50.07

Allowable values

ACCEPTED_IND

Accepted

‘Y’, ‘N’

CATALOG_NUMBER

Catalog Number

CURRENCY_CODE

Currency

All units in the ‘currency’ unit group

CY_CODE

Ctry of Origin

All countries defined on A.10.34

EXPORT_LICENSE_NUMBER

Exp Lic Number

EXPORT_LICENSE_RECEIVED_DATE

Exp Lic Recv

Any valid date

EXPORT_LICENSE_REQ_IND

Exp Lic Req

‘Y’, ‘N’

FIRST_SHIP

First Ship

0 – 99

FREIGHT_VALUE

Delivery Place

FRT_CODE

Incoterm

All incoterms defined on P.10.34

INSTALL_PRICE

Install Price

0 – 99999999999.9999

JOB_NUMBER

Account Code

All account codes defined on A.10.30

LAST_SHIP

Last Ship

0 –99

MANUFACTURER

Manufacturer

PERCENT_US_CONTENT

% Dom. Prod.

0 – 100

POLI_CLOSE_DATE

Closed

Any valid date

POLI_DIMENSIONS

Dimensions

POLI_QTY

Quantity

0 – 99999999.99

POLI_UNIT_PRICE

Unit Price

0 – 99999999999.9999

POLI_UNIT_WEIGHT

Unit Weight

0 – 99999999.99

POLI_VOLUME

Volume

0 – 99999999.99

PRICE_BASE

Price Base

‘Q’, ‘W’

PROM_CONTR_DATE

Prom Contract

Any valid date

QTY_CODE

Quantity Unit

All units in the ‘quantity’, ‘volume’,
and ‘weight’ unit groups

REVISED_PROMISE_DATE

Rev Prom

Any valid date

SUPPLY_PRICE

Supply Price

0 – 99999999999.9999

TEC_PASSED_IND

Tec Pass

‘Y’, ‘N’

VOL_CODE

Volume Unit

All units in the ‘volume’ unit group

WEIGHT_CODE

Weight Unit

All units in the ‘weight’ unit group

A.5.2 Procedure: ins_poli

A.5.2.1. General Information

This procedure inserts order line items. You can only insert line items on orders of type ’PO’ and ‘MP’. You can also create line items for change orders referencing a (manual) purchase order. You cannot insert line items on change orders referring to a blanket order or a notice of commitment. You cannot create line items for manual POs to which a blanket order has been assigned either. The order header of the line item must not be approved.

When inserting an order line item, the corresponding item shipment is created automatically at the same time. If you need to overwrite any value on such an item shipment, you must make use of the upd_ish procedure in the m_api_ish package. For this reason, this procedure does not only return the primary key of the newly created order line item, but also the primary key of the corresponding item shipment. In case more than one item shipment has been created, the primary key of the first item shipment is returned. This occurs, for example, when inserting a line item on a change order and multiple item shipments have been created for the corresponding order line on the order of type ‘PO’.

When you insert an order line item that references a requisition line item, ident and tag numbers are taken over from the requisition.

You can create a tag number by using the ITY_CODE and TAG_NUMBER column names. If you fill ITY_CODE with an item type the item rule of which is ‘TAB’, ‘TFM’, ‘TOM’, or ‘TWM’ and fill TAG_NUMBER, a tag number is created in the same way as on P.50.07.

In the case of a change order, the value of the POLI_QTY field is regarded as the new value for the order line item. For example, if you have ordered a quantity of 10 on the original order and now you want to cancel a quantity of 3, you must pass 7 to the procedure because 7 is the new quantity to be ordered.

For change orders (apart from PARENT_POLI), only those fields that you want to change have to be passed to the procedure if referencing a previous order line item. All other values are taken over from the referenced, previous line item.

Inserting completely new line items on a change order works in the same way as for purchase orders.

When inserting line items for (manual) purchase orders, you do not have to pass all columns to the procedure. For many fields, default values are assumed. For details see the list in following chapter.

A.5.2.2. Determination of Primary Keys

For retrieving the primary key of an order, an order line item, or a requisition line item, the poh_id, poli_id, and rli_id (and r_id) functions are provided in the m_pck_uk package.

If a negative value is returned, the order, requisition, or line item cannot be found.

Function poh_id

Argument Name

Type

In/Out

P_PROJ_ID

m_po_headers.proj_id

IN

P_ORIGIN_CODE

m_origins.origin_code

IN

P_ORDER_TYPE

m_po_headers.order_type

IN

P_PO_NUMBER

m_po_headers.po_number

IN

P_PO_SUPP

m_po_headers.po_supp

IN

Function poli_id

Argument Name

Type

In/Out

P_PROJ_ID

m_po_line_items.proj_id

IN

P_POH_ID

m_po_line_items.poh_id

IN

P_POLI_POS

m_po_line_items.poli_pos

IN

P_POLI_SUB_POS

m_po_line_items.poli_sub_pos

IN

Function r_id

Argument Name

Type

In/Out

P_PROJ_ID

m_reqs.proj_id

IN

P_ORIGIN_CODE

m_origins.origin_code

IN

P_R_CODE

m_reqs.r_code

IN

P_R_SUPP

m_reqs.r_supp

IN

P_ACTUAL_IND

m_reqs.actual_ind

IN

Function rli_id

Argument Name

Type

In/Out

P_PROJ_ID

m_req_line_items.proj_id

IN

P_R_ID

m_req_line_items.r_id

IN

P_RLI_POS

m_req_line_items.rli_pos

IN

P_RLI_SUB_POS

m_req_line_items.rli_sub_pos

IN

Procedure ins_poli

Argument Name

Type

In/Out

P_US_ID

NUMBER(12)

IN

P_POH_ID

NUMBER(12)

IN

P_COL_ARR

RECORD

IN

COL_NAME

TABLE OF VARCHAR2(255)

IN

COL_VALUE

TABLE OF VARCHAR2(255)

IN

P_RESULT

VARCHAR2

OUT

P_POLI_ID

NUMBER(12)

OUT

P_ITEM_SHIP_ID

NUMBER(12)

OUT

P_COMMIT_IND

VARCHAR2

IN; DEFAULT ‘Y’

Column Name

Prompt on P.50.07

Allowable values

ACCEPTED_IND

Accepted

‘Y’, ‘N’

CATALOG_NUMBER

Catalog Number

CURRENCY_CODE

Currency

All units in the ‘currency’ unit group

CY_CODE

Ctry of Origin

All countries defined on A.10.34

EXPORT_LICENSE_NUMBER

Exp Lic Number

EXPORT_LICENSE_RECEIVED_DATE

Exp Lic Recv

Any valid date

EXPORT_LICENSE_REQ_IND

Exp Lic Req

‘Y’, ‘N’; the default depends on the ZP_EXPLICR project default

FREIGHT_VALUE

Delivery Place

FRT_CODE

Incoterm

All incoterms defined on P.10.34

IDENT_CODE

Ident Code

All valid ident codes; only valid for ‘PO’, ‘MP’,
and ‘CO’ not referencing previous line item

INSTALL_PRICE

Install Price

0 – 99999999999.9999; default 0

ITY_CODE

Item Type

All item types defined on A.10.15

JOB_NUMBER

Account Code

All account codes defined on A.10.30

LAYOUT_SHORT

Layout Short (S.80.25)

LAYOUT_LONG

Layout Long (S.80.25)

MANUFACTURER

Manufacturer

PARENT_POLI

Only for ‘CO’: Primary key of line item that is to be replaced; in case another ‘CO’ already exists,
this may either be the primary key of the original line item or
the primary key of the line item on the ‘CO’

PERCENT_US_CONTENT

% Dom. Prod.

0 – 100; default 0 or 100 depending on the ZP_EXPLICR project default

POLI_DIMENSIONS

Dimensions

POLI_POS

Pos

1 – 9999999; filled with next available value in the case of a new line item
on a CO (not referencing a previous line item) if not passed over

POLI_QTY

Quantity

0 – 99999999.999; default 0

POLI_SUB_POS

Sub

1 – 99999; filled with next available value in the case of a new line item
on a CO (not referencing a previous line item) if not passed over

POLI_UNIT_PRICE

Unit Price

0 – 99999999999.9999; default 0

POLI_UNIT_WEIGHT

Unit Weight

0 – 99999999.999; default 0

POLI_VOLUME

Volume

0 – 99999999.999; default 0

PRICE_BASE

Price Base

‘Q’, ‘W’; default ‘Q’

PROM_CONTR_DATE

Prom Contract

Any valid date

QTY_CODE

Quantity Unit

All units in the ‘quantity’, ‘volume’, and ‘weight’ unit groups

REQ_LINE_ITEM

Only for ‘PO’: Primary key of any requisition line item that has been released to procurement,
can be used for purchase, and is part of the same project as the order

SUPPLY_PRICE

Supply Price

0 – 99999999999.9999; default 0

TAG_NUMBER

Tag Number

Only valid for ’PO’, ’MP’, and ‘CO’ not referencing
a previous line item; Default ’---’

VOL_CODE

Volume Unit

All units in the ‘volume’ unit group

WEIGHT_CODE

Weight Unit

All units in the ‘weight’ unit group

A.5.3 Procedure: ins_detail_poli

This procedure can be used for creating a detail tag for a tagged item (functionality provided in the procurement, expediting, traffic, and site screens through the ‘Split Tag’ button).

A detail tag can only be created on the order line item level if the following conditions are met:

  • The item rule of the item type for the ident on this order line item is ‘TAB’, ‘TFM’, ‘TOM’, ‘TWM’, or ‘SWT’.

  • The tag number is unlike ‘---‘ and unlike ‘UNTAGGED’.

  • The order line item is not a detail tag.

  • One requisition line item at most is associated with the order line item.

  • The order has not been approved so far or the order is already approved, but a split has already occurred on the order line item level prior to the approval (in this last case, you cannot add detail tags on the item shipment level).

  • No split is occurred on the item shipment level (for example, the approval of the order has been taken back but expediting has already created detail tags).

  • The order is not a blanket order and not a change order of a blanket order

To create a detail tag using this procedure, you must connect to the project in which you want to create the split.

The p_poli_id parameter must be filled with the primary key of the order line item that represents the master tag.

Argument Name

Type

In/Out

P_US_ID

NUMBER(12)

IN

P_POLI_ID

NUMBER(12)

IN

P_RESULT

VARCHAR2

OUT

P_COMMIT_IND

VARCHAR2

IN; DEFAULT ‘Y’