You can add inventory issue details to a MIR by BOM commodity by using two different APIs . These APIs differ based on the required parameters that you need to pass- on to add the details.
-
By providing IviId and LpId as mandatory elements in the body
-
By providing list nodes details (BOMListNodes).
To retrieve the valid inventory items details , use Get inventory items details.
Passing IviId and LpId as mandatory elements
This API adds inventory issue details to the specified MIR of type MIR by BOM Commodity (B) of Smart Materials.
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: POST https://(loacalhost)/smat/Project/Projects(':project')/Disciplines(':discipline')/Nls(':language')/IssueReports({key})/InvIssues
Specify the values for the project, discipline, language, and the key parameter in the URL. The project, discipline, and language together, define the project environment. The key parameter defines the MIR ID (MirId).
Element |
Description |
Type |
Required |
Notes |
---|---|---|---|---|
IviId |
Unique ID of the inventory item |
Decimal |
Required |
To view available inventory items, use: GET https://{host}/Smat/V1/Projects |
LpId |
Unique ID of the list position |
Decimal |
Required |
To view available list positions, use: GET https://{host}/Smat/V1/Projects |
Sample Code
POST https://{host}/smat/v1/Projects(‘RS’)/Disciplines(‘PIPING’)/Nls(‘English’)/IssueReports(10000054456
)/InvIssues
{"IviId": 10000083909,
"LpId": 10000103577
}
Success Response
Status: 201 Created
{
"@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": 0,
"Ident": 23162866,
"ListPosQty": 1,
"ListPosIssueQty": 0,
"QtyChanged": "N",
"OverissueQty": 0,
"OnHandQty": 98,
"DCIQty": 0,
"RevWithDC": "N",
"DCIOnHandQty": 0,
"LnId": 10000052926,
"IssueDate": "2020-11-07T00: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": 0,
"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 |
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 |
IssueQty |
Quantity of the issued material.
|
Decimal |
Ident |
Name (code) of the ident |
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 |
IssueDate |
Date and time of the material issue |
Date Time Offset |
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 |
MLDProcessimg |
MLD processing occurs, if any of the MLD type is provided by the user. Available options are:
Default value is Register and Reissue. |
String |
MLDRegisterQty |
Refers to the registered Miss or Lost or Damage (MLD) quantity. You can insert or update this quantity, only if MIR issue type is Miss, Lost, or Damage.
|
Decimal |
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 overissue quantity for the company |
Decimal |
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.
|
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 |
By providing list nodes details
This API adds the inventory issue details to the specified MIR Header (only of type MIR by BOM Commodity) for all the list nodes that are valid and have list positions.
Only those list nodes are considered as valid that passes the following criteria:
-
If a BOM set is assigned in screen C.10.18 (Site BOM Setup Nodes), then the given list node should belong to one of the assigned BOM sets or the child of the node assigned to this BOM set. .
-
If no BOM set is assigned in screen C.10.18 (Site BOM Setup Nodes), then all the list nodes that belong to login project, discipline, and queryable discipline are valid.
-
MIR should belong to the current login project and discipline.
-
MIR should not be posted, revision number should be 0, and issue type should not be P (Reverse Pick Ticket).
-
Positions must be available for that node.
-
Duplicate LnIds are ignored.
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: POST https://(loacalhost)/smat/Project/Projects(':project')/Disciplines(':discipline')/Nls(':language')/IssueReports({key})/PopulateInvIssuesByNodes
Specify the values for the project, discipline, language, and the key parameter in the URL. The project, discipline, and language together, define the project environment. The key parameter defines the MIR ID (MirId).
Element |
Description |
Type |
Required |
Notes |
---|---|---|---|---|
onlySiteStatus |
Refers to an indicator that controls which issue statuses the best quantity algorithm should be considered. Allowed values are Y, N, and Null.
|
String |
Optional |
|
bomListNodes |
List nodes of a bill of material |
Integer |
Required |
Sample Code
POST http://localhost:53539/smat/v1/Projects('RS')/Disciplines('PIPING')/Nls('English')/IssueReports(10000054897)/PopulateInvIssuesByNodes
{
"onlySiteStatus": "N",
"bomListNodes": [1234,10000053026,10000083561]
}
Success Response
Status Code: 200 OK
{
"@odata.context": "http://localhost:53427/SMAT/V1/$metadata#Collection(Com.Ingr.Smat.V1.PopulateInvIssues)",
"value": [
{
"LnId": 10000053026,
"Message": "List node populated"
},
{
"LnId": 10000083561,
"Message": "Positions are not available"
},
{
"LnId": 1234,
"Message": "Invalid List Node"
}
]
}
where LnId is the unique ID of the list node.