ue_api_bom

api_bom is a Object for Administration of the parts lists.

Current this object is not complete and don't work with unit system (factor between different untits)

 

You can declare the object with:

declare=<mybom>=ue_api_bom

 

Methods:

Property

Description

getbykey=<bom-id>

load=<bom-id>

load_or_new=<bom_id>

 

if not existing

< beas 9.1-004-065: return -1, value=0
>= beas9.1-004-065: return -1, value=-1, output an error message

 

if existing

< beas 9.1-004-065: return 0, value=0
>= beas9.1-004-065: return 1, value=-1

 

if you use load_or_new and bom is not existing, then beas don't create a error message
(beas9.1 PL: 08)

 

new=<bom-id>

 

if bom if existing, function return -1

beas 9.1-004-065: and set variable "value" to -1

 

if all ok,

< 9.1-004-065: return 0, "value" = 0

>= 9.1-004-065: return 1, "value" = 1

addline

Adds a Row

setrow=<row>

Set the actual Row

update

Updates (saves ) the actual Parts List.

goto_pos=<pos_id>

 

if position not found, api_bom will return -1 in variable value

 

Example

bom.getbykey=<bom-id>

bom.goto_pos=10

if <value> n= 1 then

 bom.length=100

end if

 

Alternative: You can use "pos_id"

set current line to the pos_id or create new line, if not existing

 

bom.getbykey=<bom-id>

bom.goto_pos_id=10

itemcodechange
(itemcode,art1_id)

 

set fields description, length, height, width, round_type and round_dec and setnull input_unit

 

Example

bom.getbykey=<bom-id>

bom.goto_pos=10

if <value> n= 1 then

 bom.itemcodechange=<ls_new_item>

end if

bom.update

header

bom - header function

processxmlrequest

Processes a series of commands formed as a XML request, this allows to replace and/or update a BOM for an item using a single XML document. See processxmlrequest

(beas9.0-000-002-000)

import

Import-Functions

renumber

 

Renumber the pos_text in Step 10, related to current sorting (field sortid)

 

 

Properties

Property

Columnname in Table

Description

rowcount


Count of all Rows. ReadOnly

currentrow


Actual Row. ReadOnly

pos_id

pos_id

 

Attention: It's not possible to change POS_ID from existing entries!!

 

if you load the item before then beas search for this row. if not existing, then beas insert a new row

 

if the pos_id from current row is NULL or 0 then beas replace the pos_id in current row

 

if the pos_id from current row > 0 then beas create a new line.

beas 9.3 PL 1

is field "sortid" is null, beas set pos_id in field sortid

if field "pos_text" is null, beas_set pos_id in field pos_text

 

Attention: if you change pos_id, you don't change the sort or visible position text

pos_text

pos_text

visible position number

sortid

sortid

Sort

length

abm1

Length

width

abm2

Width

height

abm3

Height

itemcode

art1_id

itemcode for bom

see itmecode change

quantity

menge_verbrauch

menge_lager

quantity_unit

Change Quantity

Attention: this api can't work with different units

quantityperpiece

menge_je

Quantity for each building group. If you enter 0 than Fixed quantity

activ

aktiv

Position activ? Can be set with [1,J,T,Y]
Standard: Activ.

pos_id

pos_id

Position

usertext

usertext

User Text

info

info

Info

whscode

whscode

whscode

shortvariant

shortvariant

Breakdown assemblies with this shortvariant

udf1 ... udf15

udf1 ... udf15

udf1 ... udf4

userfields

XXXX

You can assign values to any field of table BEAS_STL you simply has to set the value, to any specific field.

 

bom=U_XXX=YYY

 

Properties for import

Field


Description

headerdefinition

field,field,field

Defintion of header import

delimeter

<tab> or , or other sign

the Delimeter. Standard is <tab>

createrouting

true/false

if true, beas create one routing-position

replacemode

replace/update

if "replace" then beas delete the full bom

if "update" then beas make an update

also all Columns from the Table "BEAS_STL" and / or Customer specific Columns.

 

Example:

declare=bom=ue_api_bom

bom=new=A001

// in error case: cancel!

if <return> = -1 then

 destroy=bom

 return failure

end if

bom=header=description=my bom

bom=addline

bom=itemcode=B001

bom=quantity=4

bom=update

// don't forget: close api !!!

destroy=bom