Demo scenario on Adobe Forms using ABAP WebDynpro - Part 2


Go to the layout tab of the ‘MAIN_VIEW’ and create a place holder for the adobe form as shown below


Give the name of the node as adobe and type Interactive form

In the properties list set the Height and width and the template source as ‘ZDEPFRM’ this is the actual name of the adobe form which we have created earlier, you can see the interface context is automatically mapped to the data source.

You can see the mapped data source in the context tab of the ‘MAIN_VIEW’


Go to the Methods table of the ‘MAIN_VIEW’ and double click on the ‘WDDOINIT’ method,


We are going to write the print program’s logic in this method, we are not going to use the standard function modules that we use normally in the Report print program such as



Copy and Paste the below given code in the method. 

method WDDOINIT .
type ref to If_Wd_Context_Node,
type ref to If_Wd_Context_Element,
type If_Main_View=>Element_Zdepfrm ,
like Stru_Zdepfrm-ZDEPT,
type zdepttbl.
* navigate from <CONTEXT> to <ZDEPFRM> via lead selection
  Node_Zdepfrm = wd_Context->get_Child_Node

                 ( Name = IF_MAIN_VIEW=>wdctx_Zdepfrm ).

* @TODO handle not set lead selection
if ( Node_Zdepfrm is initial ).

* get element via lead selection
  Elem_Zdepfrm = Node_Zdepfrm->get_Element(  ).

* @TODO handle not set lead selection
if ( Elem_Zdepfrm is initial ).
    Elem_Zdepfrm  = Node_Zdepfrm->create_element( ).

select * from zdept into table i_dept.
 Item_Zdept = i_dept.

* get single attribute
Value = Item_Zdept
      Name =  
Node_Zdepfrm->bind_element( Elem_Zdepfrm ).


Go to the window ‘Z_NON_INT_FRM’ and select the window tab as shown below


Drag and Drop the ‘MAIN_VIEW’ on to the window


Save and activate the Web Dynpro

Click here to continue...

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image