Create an Open MTO Interface Import job - 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 creates an Open MTO Interface (OMI) Import job in Smart Materials.

This API creates only those OMI Import jobs that have:

  • Data Source: Flat Load Config (FLC)

  • Load options: ASCII/EXCEL/CIP.

Required Privilege: API_BOM

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://{host}/Smat/V1/Projects(‘:project’)/Disciplines(‘:discipline’)/Nls(‘:language’)/OMIImportJobs

Specify values for the project, discipline, and language in the URL. The project, discipline, and language together, define the project environment where the OMI Import job is created.

In data source, only FlatConfig source is allowed.

Element

Description

Type

Required

Notes

StatId

Unique ID of the issue status.
To view available status IDs,
use:

GET https://{host}/Smat/V1/
Projects(‘:project’)/
Disciplines(‘:discipline’)
/
Nls(‘:language’)/
IssueStatus

Integer

Required

Maximum allowed
length is 12.

LstId

Unique ID of the
list status.
To view available list IDs,
use:

GET https://{host}/Smat/V1/
Projects(‘:project’)/Disciplines(‘:discipline’)
/Nls(‘:language’)
/ListZStatus

Only those list status can be included in the
BOM import whose DeleteInd and OverWriteInd is set to Y,
and LockInd is set to N.

Integer

Required

Maximum allowed
length is 12.

JobCode

Name of the OMI Import job

String

Required

Maximum allowed
length is 20.

TransferInd

Allowed values are Y and N.

  • If value Y is passed,
    then the data is transferred
    from the import file
    to BOM.

  • If value N is passed,
    then a simulation occurs,
    and no data is transferred.

String

Optional

If no value is passed,
the application
takes the default value Y.

ImportFabSpoolsInd

Allowed values are Y and N.

  • If value Y is passed,
    then OMI Import job
    imports only fabricated spool piece items
    (TFM item type) and rejects
    the other (non-TFM item type).

String

Optional

If no value is passed,
the application
takes
the default value N.

RecognizeInd

Defines whether the OMI Import job should run in Recognize
mode or Normal mode.

Default is Normal mode.

String

Optional

If no value is passed,
the application
takes the default Normal mode.

RevIncrementInd

Defines how the OMI Import job should handle locked BOM data
whose modification records
are present in the import file.
Allowed values are Y and N.

  • If value Y is passed,
    OMI Import job unlocks BOM data.
    Create a new version of affected BOM nodes
    and assign the default
    list status to the positions.

  • If value N is passed,
    OMI Import job rejects
    the locked BOM data.

String

Optional

If no value is passed,
the application
takes the
default value N.

FindIdentInd

Allowed values are Y and N.

  • If value Y is passed,
    then you can find idents
    for new BOM positions
    during OMI Import itself.

String

Optional

If no value is passed,
the application
takes the
default value N.

MapCCInd

Allowed values are Y and N.

  • If value Y is passed,
    then company specific
    mapping for
    commodity
    codes and idents occur
    during
    the OMI import.

String

Optional

If no value is passed,
the application
takes the
default value N.

TransferSiteQty

Controls whether the Transfer Site Quantity (TSQ) for IFC
to highest issue status at node) logic should apply in the
OMI Import job when a new highest issue status is loaded.
Allowed values are Y and N.

String

Optional

If no value is passed,
the application
takes the
default value Y.

AppendInd

Allowed values are Y and N.

  • If value Y is passed,
    the OMI Import job
    appends
    the BOM position data to positions already
    existing in BOM nodes.

  • If value N is passed,
    then OMI Import job
    replaces the BOM position
    data at the BOM nodes.

String

Optional

If no value is passed,
the application takes the
default value N.

TransactionSize

Transaction size for the import job

Integer

Optional

Default value is 100.

CompanyId

Unique ID of the company for which you want to specify the mapping option.

To view available
company IDs, use:

GET https://{host}/Smat/V1/Projects(‘:project’)/
Disciplines(‘:discipline’)
/Nls(‘:language’)
/Companies

Integer

Optional

Maximum allowed
length is 12.

ImportPath

Refers to the directory where the import file is stored in the DB server.

SHARED Tip This DB server path is specified
in the DBA setting BOM_IMPORT_PATH.

String

Required

Maximum allowed length is 128.

When FLC Load Option CIP is passed,
ImportPath becomes optional.

ImportFile

Name of the imported file that is stored in the DB server

String

Required

Maximum allowed length is 30.

When FLC Load Option
CIP is passed,
ImportFile becomes optional.

PDSStartLnId

Used when data load is obtained from PDS report

Integer

Optional

Maximum allowed

length is 12.

UserComment

Comment added by the logged-in user

String

Optional

Maximum allowed
length is 80.

FlcId

Unique ID of a Flat Configuration

Integer

Required

Maximum allowed length is 12.

When FLC Load Option
CIP is passed,
FlcId becomes optional.

FlcLoadOption

Available Load option values are:

  • ASCII

  • CIP

  • EXCEL.

Default Load Option is ASCII.

String

Optional

If no value is passed,
the application
takes the Default Load Option.

If CIP is passed in
Load Option,
then ImportPath, FlcId, and
ImportFile elements become optional.

CheckConsistencyInd

Allowed values are Y and N.

  • If value Y is passed,
    then, M_PCK_OMI_CUSTOM.CHECK_Consistency
    CIP is executed.
    This CIP performs additional check that is not
    included in other
    OMI processing.

String

Optional

If no value is passed,
the application
takes the
default value N.

OMIPos

Method used by the OMI Import job to create position numbers
for the imported BOM positions.
Available methods are:

  • AUTO: OMI Import job neglects the position number
    of the imported data and instead
    builds position numbers automatically
    based on ZB_LPSTART
    and ZB_LP_INC.

  • DATA: OMI Import job
    considers position numbers
    of the imported data as
    a mandatory field.

  • BOTH: OMI Import job
    first checks imported data parameters.
    If parameters are present, it uses DATA position.
    Else, switches to AUTO.

String

Optional

If no value is passed in
OMIPos,
the application
takes the
default value AUTO.

NextStatIdInd

Refers to NextIssueStatus of B.40.01 screen of Classic.
Allowed values are Y and N.

  • If value Y is passed, then the issues status
    specified
    in OMI Import job and BOM file is ignored.
    BOM positions are created
    with the next highest issue status
    available for the node where they are imported.

Default value is N.

String

Optional

If no value is passed,
the application
takes the default value N.

LockBOMInd

Allowed values are Y and N.

  • If value Y is passed,
    then nodes, node values, positions,
    and position values are locked automatically
    during the BOM import.

String

Optional

If no value is passed,
the application takes the default value N.

FLC Delimiter

Column separator.
Example: “/”, “,”, “%”, and so on.

Default value is ;.

String

Optional

FLC Delimiter is mandatory,
if in FLC Load Option, ASCII or
EXCEL is passed.

If no value is passed,
the application takes the
default value.

Skip LInes

Number of lines to skip in an FLC load

Integer

Optional

PitStop

Allowed values are Y and N.

  • If value Y is passed,
    the FLC based import job is paused at status stage.
    You can edit and review data before continuing the job.

String

Optional

Default value is N.

Sample Code

POST https:locahost59387/SMAT/V1//Projects('AB')/Disciplines('PIPING')/NLS('English')/OMIImportJobs

{

   "JobCode":"PLJOBReview1222",

        "StatId":10000003445,

        "LstId":5745,

        "ImportFabSpoolsInd":"Y",

        "RecognizeInd":"Y",

        "RevIncrementInd":"Y",

        "FindIdentInd":"Y",

        "MapCCInd":"Y",

        "AppendInd":"Y",

        "TransferInd":"Y",

        "CompanyId":5735,

        "ImportFile":"TestfileName",

        "ImportPath":"TestFilepath",

        "FlcLoadOption":"ASCII",

        "FLCDelimiter":",",

        "SkipLines":6,

        "CheckConsistencyInd":"N",

        "OMIPos":"AUTO",

        "NextStatIdInd":"Y",

        "LockBOMInd":"Y",

        "UserComment":"Unittest",

        "PitStop":"Y",

        "FlcId":8246,

        "TransactionSize":1000,

        "PDSStartLNId":10000034373,

        "TransferSiteQty":"Y"

}

Success Response

Status: 201 Created

{

    "@odata.context": "https://localhost:59387/SMAT/V1/$metadata#Projects('AB')/Disciplines('PIPING')/Nls('English')/OMIImportJobs/$entity",

    "OMIJId":10000017298,

    "JobCode":"PLJOBREVIEW1222",

    "StatId":10000003445,

    "LstId":5745,

    "DataSource":"FLC",

    "TransferInd":"Y",

    "ImportFabSpoolsInd":"Y",

    "RecognizeInd":"Y",

    "RevIncrementInd":"Y",

    "FindIdentInd":"Y",

    "MapCCInd":"Y",

"RestartableInd":"N",

    "AppendInd":"Y",

    "TransactionSize":1000,

    "JobStatus":"NEW",

    "CompanyId":5735,

    "ImportPath":"TestFilepath",

    "ImportFile":"TestfileName",

    "PDSStartLNId":10000034373,

    "UserComment":"Unittest",

    "JobStartUser":null,

    "StartDate":null,

    "EndDate":null,

    "ExecutionSummary":null,

    "LogFile":null,

    "ErrorFile":null,

    "TransferSiteQty":"Y",

    "PitStop":"Y",

    "FlcId":8246,

    "FlcLoadOption":"ASCII",

    "FLCDelimiter":",",

    "SkipLines":6,

    "CheckConsistencyInd":"N",

    "OMIPos":"AUTO",

    "NextStatIdInd":"Y",

    "LockBOMInd":"Y",

    "DpId":5020,

    "ParentOMIJId":null

}

Element

Description

Type

Notes

OMIJId

Unique ID of the OMI Import job

Integer

DataSource

Data source of the OMI Import job

String

In this API,
only Flat Load Config source
is applicable.

JobStatus

Status of the OMI Import Job

String

Job status always remains
new by default.

DpId

Unique ID of the Discipline in which the OMI Import job is created.

Integer

ParentOmijId

Parent OMI Import job of the current OMI import job as specified in URL

JobStartUser

User who has started the OMI job

String

StartDate

Date and time when the OMI job started

Date Time Offset

EndDate

Date and time when the OMI job is completed

Date Time Offset

ExecutionSummary

A short description of the job outcome

String

LogFile

If you have run the OMI job in Online/Batch/Schedule mode, and set the parameters
'LOG_FILE_DEST' and 'LOG_ONLINE_JOBS'
in screen A.60.04, then OMI job generates a log file (FLC_ERR_RPT, FLC).

String

ErrorFile

Provides a record of actions and errors of the OMI Import job

String

RestartableInd

Allowed values are Y and N.

  • If value Y appears, then the job can be restarted.

String

Default value is N.