Integrate an Existing PDF
In this example, an existing form is used as an online PDF inside Web Dynpro.
We assume that the form is based on an typical ABAP-Dictionary-based interface.
The main difference between this and the previous example is that now the Web Dynpro context is created out of the forms interface. The interface of the form determines the Web Dynpro context.
By entering the name of the existing form, the Web Dynpro context is built automatically.
A special pop-up describes what will happen next.
The newly created Web Dynpro context node corresponds exactly to the form data view or form context.
The only thing that is missing is to transfer the data inside Web Dynpro to this new node so that the form can present the data.
There are several ways to transfer the data to the special context node, depending on the application example.
The figure above shows how data from the ADDRESS context node is transferred to the IS_CUSTOMER context node used on the form.
The knowledge needed to achieve this is based on good Web Dynpro programming knowledge (see SAP courses NET310, NET311, NET312).
This example shows the offline form (with ABAP-Dictionary-based interface) integrated in the second Web Dynpro view.
DATA lo_aif TYPE REF TO cl_wd_interactive_form. DATA lo_method_handler TYPE REF TO if_wd_iactive_form_method_hndl. * property is set only once IF first_time NE abap_true. RETURN. ENDIF. * get layout element lo_aif ?= view->get_element( ‘<name of UI-Element>‘ ). * get method handler lo_method_handler ?= lo_aif->_method_handler. * set property lo_method_handler->set_legacy_editing_enabled( abap_true ).