DtvLong dal_wdh_wri_lis ()

Writes the records changed in the widget mask back into the data base.

Input Parameters Significance
none -

Output Parameters Significance
none -

Return Code Significance
0 all ok
1 mandatory field not filled
2 error from pre-action userexit
3 error while inserting master data
4 error while updating master data
5 error while inserting relation data
6 error while updating relation data
7 error while inserting constraint data
8 error while updating constraint data
9 error from post-field userexit
10 error from post-action userexit
-1 no data base widget

Using this function you can write records, which were updated or newly created in the mask, back into the data base. Based on the internal Id number (C_ID) of the record, DataView decides, whether an update or an insert operation has to be executed in the data base. An update operation is executed if a C_ID already exists for the record while an insert operation is executed if it does not.

Only those records are written back into the data base whose dirty-flag is set. If the writing of a record is unsuccessful, the dirty-flag is not unset and the function returns an error code. In case of several incorrect records the error message refers to the record edited last, i.e. the one with the highest line number.

Before and after the data base transaction the Pre_ - and Post_Action triggers are called for each edited record.

The function automatically invokes a Fetch after Write callback function, is set with dal_wdh_set_chk_faw.