POST / PUT is working in same way. You can use the POST command to change data.
If the item does not exist, the the system creates it.
If the item exists, it makes an update.
For creation the system create always a copy from default item, which you can define in configuration wizzard
Example:
POST Item
Body: {"ItemCode":"RM001","ItemName":"Raw Material / Not Normal","DrawingNumber":"12343244"}
You can use the Names from Beas Service Layer or table field names from the table OITM for changing properties
The system converts field names always to the name of related database system.
Example: {..."u_znr":"1234"} MSSQL: Save in OITM.U_znr, HANA in OITM.U_beas_znr
Same is "u_beas_znr" or "DrawingNumber"
Return value
The system returns error information or the created / updated item code
Error Example:
{ "error": {
"code": 400,
"message": {
"lang": "en-us",
"value": "unknown property dradwingnumber"
}
}
}
If ok, it returns
{
"value": "RM001",
"transaction": "update" // or create or duplicate
"source": "xxx" // the source item code, only if transaction is create or duplicate
}
Example with more items:
POST ITEM
{"ItemCode":"test-w","ItemName":"Main Level Order Stock",
"ManageBatchNumbers":false,"ManageSerialNumbers":false,"BatchnumberGeneration":"N","Breakdown":"B",
"ProcurementMethod":"M","ItemVersionAdministration":0,
"CalculationPrice":0,"CalcLotSizeInventoryUOM":0,"CalcLotSizeProductionUoM":0,
"MinimumOrderQuantity":0,"OrderMultiple":0,"InventoryUOM":"Pcs",
"ProductionUnit":"box","PurchaseUnit":"Pcs","DefaultWareHouse":"01","DrawingNumber":null,
"MatchCode":null,"DIN":null,"MaterialGroupId":"HM","ShelfLife":0,"RawMaterialId":null,
"ProductionLotSizeUnit":1,"ProductionLotSize":1.5}
UoM: if all UoM have the same value, you can use "UoM"
{"ItemCode":"test-w","ItemName":"Main Level Order Stock","UoM":"kg",...}
BreakDown: with breakdown the system change automatically all related fields, example: Phantom item. For more information see breakdown
{"ItemCode":"phantom1","ItemName":"Phantom","Breakdown":"S"}
Copy item
If you want to use another Default item, you can define this in "SourceItemCode"
let r=bsl.post ("Item",{"SourceItemCode":"RM001","ItemCode":"Test-RM001","ItemName":"Raw Material / Normal","DrawingNumber":"12343244"});
Special properties
Field |
Description |
|---|---|
breakdown |
Define order/stock related breakdown and set all related properties automatically. See in changeable properties below. |
unit |
Define all units with one command "ProductionUnit", "PurchaseUnit","InventoryUoMEntry","salesunit"
Note UoM ID must be defined in UoM table.
UoM Groups: If you work with UoM Groups, you must FIRST define the Group ID and then the UoM fields. Otherwise, the UoM-ID fields are not filled. |
Changeable properties
Field |
FieldName/Alternative |
Description |
|||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
assetitem |
assetitem |
||||||||||||||
batchnumbergeneration |
u_beas_batchroh,u_batchroh |
||||||||||||||
barcode |
codebars |
Barcode / EAN Code |
|||||||||||||
breakdown |
u_dispo,u_beas_dispo |
|
|||||||||||||
calclotsizeInventoryuom |
u_losgr_ka,u_beas_losgr_ka |
||||||||||||||
calculationprice |
u_kalk_pr,u_beas_kalk_pr |
||||||||||||||
defaultwarehouse |
dfltwh |
||||||||||||||
desiredinventory |
reorderqty |
||||||||||||||
din |
u_din,u_beas_din |
||||||||||||||
drawingnumber |
u_beas_znr,u_znr |
||||||||||||||
frozenfor |
|||||||||||||||
frozenfrom |
|||||||||||||||
frozenremarks |
frozencomm |
||||||||||||||
frozento |
|||||||||||||||
glmethod |
|||||||||||||||
inventoryitem |
invntitem |
Stock-managed item true/false |
|||||||||||||
inventoryuomentry |
invntryuom,unit,"uom" |
Stock unit |
|||||||||||||
isphantom |
phantom |
|
|||||||||||||
itemname |
|||||||||||||||
itemsgroupcode |
itmsgrpcod |
Item Group |
|||||||||||||
ItemVersionAdministration |
u_beas_vercontrol |
|
|||||||||||||
IVersionId |
u_beas_ver |
|
|||||||||||||
leadtime |
|||||||||||||||
managebatchnumbers |
manbtchnum |
||||||||||||||
manageserialnumbers |
mansernum |
||||||||||||||
matchcode |
u_match,u_beas_match |
||||||||||||||
materalgroupid |
u_gruppe,u_beas_gruppe |
||||||||||||||
mininventory |
minlevel |
||||||||||||||
picturename |
picture |
||||||||||||||
picturename2 |
u_picture2,u_beas_picture2 |
||||||||||||||
picturename3 |
u_picture3,u_beas_picture3 |
||||||||||||||
PlaningSystem |
planingsys |
Planning System true=Material requirement planning system false=No Planning system (the item can't be seen in MRP) |
|||||||||||||
procurementmethod |
prcrmntmtd |
||||||||||||||
productionlotsize |
u_losgr,u_beas_losgr |
Production Lotsize in Unit "Productionlotsizeunit" |
|||||||||||||
productionlotsizeunit |
u_beas_prlotsizeu |
|
|||||||||||||
ProductionUnit |
U_me_verbr, U_beas_me_verbr |
Production UoM |
|||||||||||||
purchasefactor1 |
purfactor1 |
||||||||||||||
purchaseheightunit |
bhght1unit |
||||||||||||||
purchaseheightunitbheight1 |
bhght1uni purchaseunitheight |
||||||||||||||
purchaseitem |
prchseitem |
||||||||||||||
purchaseitemsperunit |
numinbuy |
||||||||||||||
purchaselengthunit |
blen1unit |
||||||||||||||
purchasepackagingunit |
purpackmsr |
||||||||||||||
purchaseqtyperpackunit |
purpackun |
||||||||||||||
purchaseunit |
buyunitmsr |
||||||||||||||
purchaseunitvolume |
bvolume |
||||||||||||||
purchaseunitweight |
bweight1 |
||||||||||||||
purchaseunitweight1 |
bweight2 |
||||||||||||||
purchaseunitwidth |
bwidth1 |
||||||||||||||
purchasevolumeunit |
bvolunit |
||||||||||||||
purchaseweightunit |
bwght1unit |
||||||||||||||
purchasewidthunit |
bwdth1unit |
||||||||||||||
purchasewidthunit |
bwdth1unit |
||||||||||||||
purfactor2,purchasefactor2 |
purfactor2 |
||||||||||||||
purfactor3,purchasefactor3 |
purfactor3 |
||||||||||||||
purfactor4,purchasefactor4 |
purfactor4 |
||||||||||||||
qrygroup1-60 |
Item Properties 1-6. Allowed value is Y or N |
||||||||||||||
rawmaterialid |
u_beas_wst_id,u_wst_id |
||||||||||||||
salesfactor1 |
salfactor1 |
||||||||||||||
salesfactor2 |
salfactor2 |
||||||||||||||
salesfactor3 |
salfactor3 |
||||||||||||||
salesfactor4 |
salfactor4 |
||||||||||||||
salesitemsperunit |
numinsale |
||||||||||||||
salpackmsr,salespackagingunit |
|||||||||||||||
salpackun,salesqtyperpackunit |
|||||||||||||||
salunitmsr,salesunit |
|||||||||||||||
sellitem,salesitem |
|||||||||||||||
sheight1,salesunitheight |
|||||||||||||||
sheight2,salesunitheight1 |
|||||||||||||||
shelflife |
u_haltbark,u_beas_haltbark |
||||||||||||||
shght1unit |
salesheightunit |
||||||||||||||
shght2unit |
salesheightunit1 |
||||||||||||||
slen1unit |
saleslengthunit |
||||||||||||||
slen2unit |
slen2unit |
||||||||||||||
slength1 |
salesunitlength |
||||||||||||||
slength2 |
salesunitlength1 |
||||||||||||||
specificweight |
u_spezgew,u_beas_spezgew |
Specific weight of this item. Can be used for the Conversion factor from Stock to production unit (density) |
|||||||||||||
suppliercatalogno |
suppcatnum |
||||||||||||||
svolum |
salesunitvolume |
||||||||||||||
svolunit |
salesvolumeunit |
||||||||||||||
swdth1unit |
saleswidthunit |
||||||||||||||
swdth2unit |
saleswidth2unit |
||||||||||||||
sweight1 |
salesunitweight |
||||||||||||||
sweight1 |
salesunitweight1 |
||||||||||||||
swght1unit |
salesweightunit |
||||||||||||||
swght1unit |
salesweightunit1 |
||||||||||||||
swidth1 |
salesunitwidth |
||||||||||||||
swidth2 |
salesunitwidth1 |
||||||||||||||
sww |
|||||||||||||||
taxtype |
|||||||||||||||
tolerancedays |
toleranday |
||||||||||||||
U_[fieldName] |
All additional field Names |
|
|||||||||||||
unit |
uom |
Define Unit of measurement in all areas (Purchase, Sales, Stock, Production) |
|||||||||||||
uomgroupentry |
upgentry |
||||||||||||||
user_text |
usertext |
||||||||||||||
valid |
validfor |
||||||||||||||
validfrom |
validfrom |
||||||||||||||
validremarks |
validcomm |
||||||||||||||
validto |
validto |
||||||||||||||
WareHouseRuleId |
U_beas_bingroup |
Warehouse Rule |
|||||||||||||
ScrapPercent |
u_aussch / u_beas_aussch |
Scrap / Cut off in Percent |
|||||||||||||
ScrapTable |
u_verschn / u_beas_verschn |
Scrap / Cut off link to scrap table |