In this recipe, we will see how we can display an Adobe form within a Web Dynpro application. We will use one of the forms that we created in the Creating nested tables recipe in Chapter 13, SAP Interactive Forms by Adobe.
We will now see the required steps in detail:
MAIN
view, we create an interactive UI element. We name it INTERACTIVEUI
.ZST8_NESTED_TABLES_EXAMPLE
as used in the Creating nested tables recipe in Chapter 13, SAP Interactive Forms by Adobe.We will also increase the height and width to 1500px
instead of the default 300px
.
EMPLOYEE_GRADES
and EMPLOYEE_ADDRESS
are generated in the CONTEXT MAIN
window of the view in question.EMPLOYEE_GRADES
and EMPLOYEE_ADDRESS
nodes in the WDDOINIT
method of the MAIN
view. We use the Web Dynpro code wizard and choose the settings shown in the following screenshot (both for the EMPLOYEE_ADDRESS
and the EMPLOYEE_GRADES
nodes).EMPLOYEE_GRADES
node is shown as follows:DATA LO_ND_EMPLOYEE_GRADES TYPE REF TO IF_WD_CONTEXT_NODE.DATA LT_EMPLOYEE_GRADES TYPE WD_THIS->ELEMENTS_EMPLOYEE_GRADES.LO_ND_EMPLOYEE_GRADES = WD_CONTEXT->PATH_GET_NODE( PATH = `ZST8_NESTED_TABLES_E.EMPLOYEE_GRADES`).""" code to fill LT_EMPLOYEE_GRADES not shownLO_ND_EMPLOYEE_GRADES->BIND_TABLE( NEW_ITEMS = LT_EMPLOYEE_GRADES SET_INITIAL_ELEMENTS = ABAP_TRUE ).
We first created an interactive UI element in our view layout. Then we linked it to our Adobe forms using the template source property. We then generated a context corresponding to the Adobe form in our view. The appropriate code was then added in the WDDOINIT
view for populating the data context nodes EMPLOYEE_GRADES
and EMPLOYEE_ADDRESS
. Upon running the application, the data of the grades and addresses were passed on to the Adobe form cotext node.
The displayed PDF form opens in the browser as shown in the following screenshot:
18.224.56.29