PreAssign

PreAssign

With this table you can create pre assign (POST) and can read all preassigned Items

Example for Work order Backflush process

 

Property

Description

Table

BEAS_PLANDOCUMENT

Primary key

DocEntry/i

$transaction

no

$branch

no

$mask

no

 

Fields

Name

Type

Description

DocEntry

Edm.Int32

Entity Relation: PreAssignLines -> DocEntry

Database: "BEAS_PLANDOCUMENT"."DocEntry"

DocType

Edm.String(20)

Database: "BEAS_PLANDOCUMENT"."DocType"

PersonnelId

Edm.String(20)

Database: "BEAS_PLANDOCUMENT"."PERS_ID"

StationId

Edm.String(20)

Database: "BEAS_PLANDOCUMENT"."STATION_ID"

Reference

Edm.String(100)

Database: "BEAS_PLANDOCUMENT"."Ref2"

Notes

Edm.String(100)

Database: "BEAS_PLANDOCUMENT"."Comments"

DocDate

Edm.DateTimeOffset

Database: "BEAS_PLANDOCUMENT"."DocDate"

LifeDate

Edm.DateTimeOffset

Database: "BEAS_PLANDOCUMENT"."LIFETIME"

 

Relations

Join to Entiy Object

Relation

PreAssignLines

DocEntry

 

 

hmtoggle_plus1Create PreAssign

 

With the following post command a generate PreAssign document for a work order can be generated.

It is possible to create a PreAssign document, which can be read with get PreAssign or to return all information directly as JSON.

 

post PreAssign
  {"BaseDocEntry":103,
   "BaseLineNumber":10}

 

Returns

 

The PreAssign document information can be read with the following command:

get PreAssignLines?§filter=DocEntry = 5

 

The PreAssign document information related to the bill of material position can be read with the following command:

get WorkorderBom?$select ItemCode,Quanitty,PreAssignLines

  &$filter=DocEntry eq 103 and LineNumber eq 10

  &$expand=PreAssignLines($filter=DocEntry eq  5)

 

 

Property for the POST command

Type

Description

BaseDocEntry

Edm.Int32

Work order DocEntry (BEAS_FTPOS.BELNR_ID)

BaseLineNumber

Edm.Int32

Work order LineNumber (BEAS_FTPOS.BELPOS_ID)

RoutingPosition

Edm.Int32

If you define the Routing position, the system return only BoM Position linked with this Routing position

Related Property:

Extern:"Y": Only BoM for external delivery. See PDocType, Extern, ExternalDocEntry

Extern:"N": Only BoM not related to external delivery

Quantity

Edm.Decimal

Goods Receipt Quantity

The system calculates the required quantity based on planned quantity and defined quantity.

Define this in Stock Quantity.

Scrap

Edm.Decimal

Example:

Good = 10
Scrap = 2

 

Define:

Quantity=12
Scrap=2

WhsCode

Edm.String

Backflush only from this warehouse (optional).

SetBatchNumber

Edm.String

true/false assign BatchNumbers

SetSerialNumbers

Edm.String

true/false assign SerialNumbers

Format

Edm.String

JSON = Return Result as Json String

"" = Create document and return Docenrty

CreateMessage

Edm.Boolean

If true, the system returns the Shortage in JSON format.

ExternalDocEntry

Edm.Number

External Docentry (External production process)

PDocType

Edm.String

Define the process

Allowed is:

issuewo

externalsend (External production - send to supplier)

externalissue (External production - issue from extern)

 

Note: if you work with extern process, set "external"=Y and correct routing position

Extern

Edm.String

Works only together with RoutingPosition

Y=Only BoM linked to external Routing Position

N=Only BoM linked to not external Routing Position

Empty = No filter

 

If you define Y,

set correct PDocType, ExternalDocEntry and RoutingPosition

 

Returns following information:

Property for the POST Command

Type

Description

Canceled

Edm.Bolean

Return true, if the process is canceled, for example if there is not enough material with the do not continue setting.

OpenEntries

Edm.Bolean

Return true, if Entries exist without enough stock.

EntryFound

Edm.Bolean

Return true, if Preassign Material exists.

Shortage

 

Property for Post Command

Typ

Description

ItemCode

Edm.String

ItemCode

WhsCode

Edm.String

Default WhsCode

Required

Edm.Decimal

Required Quantity

Shortage

Edm.Decimal

Not preassigned Material (Stock not enough)

UoM

Edm.String

Stock Unit

RoundDec

Edm.Int32

Count of Decimal places

Return Array of not Preassigned Material only, if CreateMessage=true.

ShortageMessage

Edm.String

Returns the "not enough memory" in language of the current user, if CreateMessage=true.

PreAsssign

Property for Post Command

Typ

Description

BaseDocEntry

Edn.Int32

Document (Example: BEAS_FTHAUPT.BELNR_ID)

BaseLineNumber

Edn.Int32

Document Line (Example: BEAS_FTPOS.BELPOS_ID)

BaseLineNumber2

Edn.Int32

Document Line 2 (Example: BEAS_FTSTL.POS_ID)

BaseDocType

Edn.Int32

Wo for Work order

ItemCode

Edm.String

ItemCode

WhsCode

Edm.String

Default WhsCode

Quantity

Edm.Decimal

Required Quantity

IVersion

Edm.String

Item Version

BinCode

Edm.String

Bin Location

RFID

Edm.String

RFID Code

Return Array of assigned material if Format=Json.

 

 

(Format=Json and CreateMessage=true):

{
    "Shortage": [
        {
            "ItemCode": "AB0020000",
            "WhsCode": "09",
            "Required": 610,
            "Shortage": 610,
            "UoM": "Pcs",
            "RoundDec": 3
        }
    ],
    "ShortageMessage": "Not enough inventory",
    "PreAssign": [
        {
            "BaseDocEntry": 1311,
            "BaseLineNumber": 10,
            "BaseLineNumber2": 41,
            "BaseDocType": "wo",
            "ItemCode": "C16900",
            "WhsCode": "01",
            "DistNumber": "",
            "Quantity": 5,
            "IVersion": ""
        },
        {
            "BaseDocEntry": 1311,
            "BaseLineNumber": 10,
            "BaseLineNumber2": 11,
            "BaseDocType": "wo",
            "ItemCode": "C16108",
            "WhsCode": "01",
            "DistNumber": "",
            "Quantity": 4,
            "IVersion": ""
        }
    ],
    "OpenEntries": true,
    "EntryFound": true
}

 

 

Follow return values are aviable

(Powerbuilder: gbsl.iu_return.[property]

Value

Description

is_ret_value

Complete Json String

il_ret_code

0=ok, -1=error

docEntry

Beas_Plandocument Docentry

b_parm1

true = can't preassign all positions

b_parm2

true = entries found

s_parm1

Beas_Plandocument.DocType (is_pdocktype)