The standard userexits of the module iwf
and the functions in the module wdh
provide you numerous functions to interactively create and manage widgets and their data. To allow you to use this functionality in batch-controlled operation, too, you have to secure that the created objects remain in the background and no interactive dialog is started.
You get into this program state setting the widget virtual mode using the function dal_wdg_set_vir. If you create widgets in widget virtual mode, DataView prevents them from being displayed on the screen. In contrast to interactive mode a widget created in virtual mode is not active after it has been created. You have to explicitly activate it with the function dal_wdg_act_vir. Only then you can edit the data in the widget via program functions that correspond to the standard functions of interactive mode. The following sections will tell you how to read, edit, create, or delete records in virtual widgets.
If you finished working at the virtual widget, you have to delete the virtual widget and deactivate widget virtual mode with the function dal_wdg_set_vir. DataView then returns to the interactive dialog an and restores the state of the user interface before widget virtual mode.
When working with virtual widgets, carefully check whether DataView is to call the userexits at the triggers of the mask in the virtual widget in widget virtual mode, too. You can suppress the userexit calls. To do so, use one of the following methods:
Error messages which DataView outputs in the message window when editing widget data in interactive operation can be blocked in batch mode with the function dal_mes_xof. Using dal_mes_xon you reactivate output of error messages.
To be able to watch all actions in widget virtual mode during the test phase of programming on the screen you have the possibility to use the function dal_wdg_set_vir to set virtual debug mode. DataView then shows the virtual widget, which is normally invisible, on the screen. Thus you can see all changes to the data in the widget.