# Enterprise Communication Interface (ECI)

## eci_wri_ent

### Description
Insert or update record in an entity list. Opens list to entity. Check if a record is found (sel_fld_nam/sel_fld_val), yes: call eci_upd_ent no: call eci_ins_ent
### Input parameter
ent_nam
string | name of entity
wdg_nam
string | name of mask
wdg_ext
string | activate system fields on mask {"on", "off"}
wdg_mod
string | mode of widget {"list","form","bvb"}
act_mod
string | mode of interaction {"int","bat"}
res_flag
string | update record only if reserved {"on","off","reset"}
sel_fld_nam
stringlist | names of fields for selection
sel_fld_val
stringlist | values of fields for selection
wri_fld_nam
stringlist | names of fields to write
wri_fld_val
stringlist | values of fields to write
ret_fld_nam
stringlist | names of fields to return
optimize
string | With this parameter a database update is only done if the old and new values differ (and therefore, the modification date is not changed if the values are the same). on = before writing the values of input parameter upd_fld_val it is checked whether the old value differs from new value. Only in this case the "new" value is written in field. off = Value of upd_fld_val is written to field.
### Output parameter
ret_fld_val
stringlist | values of fields to return
### Example
Insert or update an item record Input parameter:
ent_nam | "EDB-ARTICLE"
wdg_nam | "EDB-ART-SLI"
wdg_ext | "on"
wdg_mod | "list"
act_mod | "int"
res_flag | "off"
sel_fld_nam | "T_MASTER_DAT.PART_ID"
sel_fld_val | "art002"
wri_fld_nam | "T_MASTER_DAT.PART_ID"
| "T_MASTER_DAT.PART_NAME"
wri_fld_val | "art002"
| "name of art002"
ret_fld_nam | "T_MASTER_DAT.C_ID"