DataView offered a buffer for each object (widget, mask, field...) in which object-specific information can be stored by the respective application.
To use this buffer with different applications (userexits) at the same time the following functions are available in order to store several information parallel in a buffer with self-defined keys:
cp_buffer = wdg_ret_buf(wdg);
cp_new_buf = zag_set_buf_elm (cp_buffer,"BSP_ELM1","This E1");
wdg_set_buf (wdg,cp_new_buf);
cp_buffer = wdg_ret_buf (wdg);
if (zag_get_buf_elm(cp_buffer,"BSP_ELM1", ca_result) == 0)
printf ("Contents element 1 = %s\n",ca_result);
cp_buf |
|
Old buffer string [or NULL] |
cp_key | User defined key |
cp_text |
|
Text (value) to be set for this key |
cp_buf |
|
Old buffer string [or NULL] |
cp_key | User defined key |
cp_text |
|
Text (value) for this key |
0 |
= |
Key could not been found in buffer string. |
1 |
= |
Key does not exist in buffer string or buffer string is NULL (empty). |