# Enterprise Communication Interface (ECI)

## eci_wri_typ

### Description
Insert or modify record in type list. Open mask of type. Select record. If record exists: call eci_upd_typ If record does not exist: call eci_ins_typ
### Input parameter
ent_nam
string | name of entity
typ_nam
string | name of type
wdg_nam
string | name of mask
wdg_ext
string | activate system fields on list {"on", "off"}
wdg_mod
string | mode of widget {"list","form","bvb"}
act_mod
string | mode of interaction {"int","bat"}
res_flag
string | modify record only if reservation is set {"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 default fields
wri_fld_val
stringlist | values of default fields
ret_fld_nam
stringlist | names of field 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 field to return
### Example
Insert or modify a document type record Input parameter:
ent_nam | "EDB-DOCUMENT"
typ_nam | "DRAWING"
wdg_nam | "EDB-DOC-DRW-TLI"
wdg_ext | "off"
wdg_mod | "list"
act_mod | "bat"
res_flag | "off"
sel_fld_nam | "T_DOC_DAT.DOCUMENT_ID"
sel_fld_val | "drw002"
wri_fld_nam | "T_DOC_DAT.DOCUMENT_ID"
| "T_DOC_DAT.DOC_NAME"
wri_fld_val | "drw002"
| "name of drw002"
ret_fld_nam | "T_DOC_DRW.C_ID"
| "T_DOC_DAT.C_ID"