Update an inventory issue details - Intergraph Smart Materials - Version 2017 R2 (2.2) - Help - Hexagon

Intergraph Smart Materials Web API Help 2017 R2 (2.2)

Language
English
Product
Intergraph Smart Materials
Subproduct
Web API
Search by Category
Help
Version Smart Materials Web API
2017 R2 (2.2)

This API updates an existing inventory issue details of an MIR of a project in Smart Materials.

  • You can update only those inventory issue details that are linked to a MIR of type; MIR by BOM Commodity (B).

  • You can update only specific attributes of an inventory issue detail of a MIR by BOM Commodity.

  • If given RevisionId >0, then only descriptions & InvIssues are updated, Header properties are ignored.

  • The attributes of the Inventory issues that can be updated depends on the Issue Type of the corresponding header MIR type.

    • If Issue Type is Miss, Lost, or Damage, then it further depends on MLDProcessing type.

      MLDProcessing Type

      Parameters that can be updated

      Register Only

      IssueQty, IssueDate, and MLDRegisterQty

      Register and Reissue

      IssueQty, IssueDate

      Use OI to Compensate

      IssueQty, IssueDate, MLDRegisterQty, and UsedOIQty

    • If Issue type is Regular, then elements you can update are IssueQty and IssueDate only.

Required Privilege: API_MIR

Headers

Header Name

Description

Required

Values

Authorization

Access token

Required

Bearer <access_token>

Content-Type

Request type format

Required

application/JSON

Body

URL Format: PATCH https://{host}/Smat/V1/Projects(':project')/Disciplines(':discipline')/Nls(':language')/IssueReports({key1})/InvIssues({key2})

Specify the values for the project, discipline, language, and key parameters in the URL. The project, discipline, and language together, defines the project environment. The key1 parameter defines the Material Issue Report ID (MirId) and key2 parameter defines inventory issue details ID (IisId).

Element

Description

Type

Required

Notes

IssueDate

Date and time of the material issue

Date Time Offset

Optional

IssueQty

Quantity of the issued material.

  • Depends on the project default ZC_QTYRECV.

    • If value of ZC_QTYRECV, is set to Y, the amount of issued quantity refers to BOM quantity, if revision= 0. If revision is greater than 0, then defined value is considered.

    • If value is ZC_QTYRECV, is set to N, defined value is considered.

  • Issued quantity gets reserved in the inventory, until the MIR is posted.

Decimal

Optional

MLDProcessing

MLD processing occurs if any of the MLD type is provided by the user. Available options are:

  • NULL

  • Register and Reissue: MLD gets registered (with this MIR) and a new quantity is issued. You can only insert the MLD quantity and the issue quantity.

  • Register only: MLD gets registered and you can insert only the MLD quantity.

  • Use OI to compensate: this option allows you to insert a quantity (max Overissue On-hand Qty) to compensate the MLD. After you have posted the MIR, the quantities will be issued against the overissue warehouses (MLD Qty), and the inventory warehouse (Issue Qty). The overissue quantity will be revised for the company in old MIRs.

Default value is Register and Reissue.

String

Optional

If Issue Type is M, L, or D, then based on MLDProcessing, you can update the elements in the API.

MLDRegisterQty

Refers to the registered Miss or Lost or Damaged (MLD) quantity. You can insert or update this quantity, only if MIR issue type is Miss, Lost, or Damage.

The MX MLD Qty is equal to the Sum Issued/Overissue Qty

Decimal

Optional

Can be updated only when MLD Processing is Register Only or Used OI to Compensate.

UsedOIQty

You can compensate MLD quantity with overissue quantities made for previous MIRs of the same company. However, to use this overissue quantity, MLD type should be "Use OI to compensate". This quantity is UsedOI quantity.

The max quantity of the Used Overissue Qty is equal to the Overissue On-hand Qty and the MLD Qty.

Decimal

Optional

Can be updated only when MLDProcessing is Used OI to Compensate.

Sample Code

PATCH http://localhost:54629/smat/v1/Projects('RS')/Disciplines('PIPING')/Nls('English')/IssueReports(10000054456)/InvIssues(10000151185)

 {"IssueQty": 20,

 "IssueDate":"2019-11-05T00:00:00+05:30"

 }

Success Response

Status: 200 OK

{

    "@odata.context": "http://localhost:53427/SMAT/V1/$metadata#Projects('RS')/Disciplines('PIPING')/Nls('English')/IssueReports(10000054456)/InvIssues/$entity",

    "ProjId": "RS",

    "DpId": 5020,

    "IisId": 10000151185,

    "IviId": 10000083909,

    "MirId": 10000054456,

    "IvprId": null,

    "BomPath": "-1234",

    "LpId": 10000103577,

    "IssueQty": 20,

    "Ident": 23162866,

    "ListPosQty": 1,

    "ListPosIssueQty": 0,

    "QtyChanged": "N",

    "OverissueQty": 0,

    "OnHandQty": 98,

    "DCIQty": 0,

    "RevWithDC": "N",

    "DCIOnHandQty": 0,

    "LnId": 10000052926,

    "IssueDate": "2019-11-05T00:00:00+05:30",

    "WhId": 10000002904,

    "LocId": 10000010899,

    "SmstId": 5701,

    "MLDProcessing": "NULL",

    "MLDRegisterQty": 0,

    "TotalOIQty": 0,

    "OIOnHandQty": 0,

    "SumOIQty": 0,

    "UsedOIQty": 0,

    "RevOverissueQty": 0,

    "UnitId": 500127,

    "TagNumber": null,

    "TotalRecvQty": 100,

    "ListPosResvQty": 0,

    "CommodityId": 4520871,

    "Size1": "26",

    "Size2": "0",

    "Size3": "0",

    "Size4": "0",

    "Size5": "0",

    "HeatId": null,

    "ItemShipId": null,

    "ResvQty": 20,

    "OriginalIdent": null

}

Element

Description

Type

ProjId

Unique ID of the Project. Inventory issues are added to the MIR present in this project.

String

DpId

Unique ID of the Discipline. Inventory issues are added to the MIR present in this discipline.

Integer64

IisId

Unique ID of the inventory issue

Integer64

MirId

Unique ID of the MIR. Inventory issue details are added to this MIR.

Integer64

IviId

Unique ID of the inventory items related to this inventory issue

Integer64

IvprId

Unique ID of the inventory position reservations

Integer64

BOM Path

Refers to the BOM path of a BOM position, if a position is linked/assigned to the issue item.

String

Ident

Name (code) of the ident

Integer64

LpId

Unique ID of the list positions

Integer64

ListPosQty

Quantity of the list position

Integer64

ListPosIssueQty

Issued quantity of the list position

Integer64

QtyChanged

Indicates whether the quantity of the material is changed after the last revision or not? Available values are Y and N.

String

OverissueQty

Received quantity by an overissue

Decimal

OnHandQty

Refers to On-hand quantity and is calculated as (= received quantity - reserved quantity - issued quantity).

Decimal

DCIQty

Refers to the Design Change Issue quantity. You cannot update this quantity.

Decimal

RevWithDC

Indicates whether the quantity is revised with respect to DCI Qty or not? Available values are Y and N.

String

DCIOnHandQty

Refers to the DCI On-hand Quantity. You cannot update this quantity.

Decimal

LnId

Unique ID of the list node

Integer64

WhId

Unique ID of the warehouse.

Assigning warehouses depend on the project default ZC_MULT_WH.

  • If ZC_MULT_WH is set to Y, you can assign only those warehouses to user from screen C.10.02 that have checked "Multiple Selection" indicator, to the MIR.

Integer64

LocId

Unique ID of the location

Integer64

SmstId

Unique ID of the site material status

Integer64

TotalOIQty

Total overissue quantity that can be used to compensate a MLD quantity

Decimal

OIOnHandQty

Sum of the overissue on-hand quantity

Decimal

SumOIQty

Sum of the issued and overissued quantity for the company

Decimal

RevOverissueQty

Revised quantity by an overissue

Decimal

UnitId

Unique ID of the unit

Integer64

TagNumber

Tag number for this ident

String

TotalRecvQty

Total received quantity for this ident

Integer64

ListPosResvQty

Reserved quantity of the list position

Integer64

CommodityId

Unique ID to identify the commodity

Integer64

Size (1-5)

Sizes of ident (1-5)

String

HeatId

Unique ID of the heat number

Integer64

ItemShipId

Unique ID of the item shipments

Integer64

ResvQty

Reserved quantity by a forecast

Decimal

OriginalIdent

Original Ident

Integer64