Skip to end of metadata
Go to start of metadata

First we create a table in SE11 and Activate it.

Create some entries in the table

create a table type for table YDEPARTMENT
now in SFP tcode create an interface  YH1328_DEPARTMENT_INTERFACE with import parameters as the database table of type table type created.

create form in SFP YH1328_DEPARTMENT_FORM

Click on layout tab drag the table from on the page , Save & Activate the Form

In SE80 Create a Web Dynpro Application yh_dept_dyn_adobe  create a View and Window
In the Layout Tab of the view MAIN create an Interactive Element. 
In the properties give template source as ' YH1328_DEPARTMENT_FORM'  this the adobe form that we have created earlier and the data in automatically avaiable to the data source.
In the Method Tab of the MAIN view in method 'WDDOINIT'  give the code below

    Node_Zdepfrm                    type ref to If_Wd_Context_Node,
    Elem_Zdepfrm                    type ref to If_Wd_Context_Element,
    Stru_Zdepfrm                    type If_Main_View=>Element_Zdepfrm ,
    Item_ZDEPT                      like Stru_Zdepfrm-ZDEPT,
    i_dept                          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 =  `ZDEPT`
Node_Zdepfrm->bind_element( Elem_Zdepfrm ). 

create webdynpro  application and activate it. Test it ...
An idobe form is displayed with the table and the data contents.

  • No labels