Skip to Content
Author's profile photo Mohammed Anzy S

Webdynpro ABAP Quick Tips 1.1:Table Popin in steps

In the last edition of quick tips  we discussed about implementing table sort in four steps and in this edition we will exploring more on the table popin feature. We can use table popins  in  scenarios where we want to restrict the number of columns in a table but not the information displayed in the row. Which means that using the table popins we could display more information pertaining to a table row. This blog will tell you a step by step approach to implement table popin in your application.

1.Create an attribute in the context  

 We need to create an attribute in the context  node to which the table is bound .Let the new attribute be TABLE_POPIN of type string.

 

 

2.Create a table popin for the selected table

We need to select the column for which we need to enable  table popin property. Right click and create a table popin and then create a transparent container under that.

 

 

In the transparent container , create the fields that you want to  display and bind the properties to respective context attributes. Here in this example , I have created two fields First Name and Second Name with the corresponding labels.

 

 

3.Create onAction for the table column. 

 Here in the table column field onAction method add the following code for setting the table popin.

 

 

 

Data:wd_table_cell_editor type ref to cl_Wd_view_element,

         wd_table_column      type ref to cl_wd_table_column,

         wd_popin             type ref to cl_wd_table_popin,

         CONTEXT_ELEMENT      type ref to if_wd_context_element.

 

wd_table_cell_editor ?= wd_this->m_view->get_element( id ).

wd_table_column ?= wd_table_cell_editor->get__parent( ).

wd_popin = wd_table_column->get_popin( ).

 

CALL METHOD WDEVENT->GET_CONTEXT_ELEMENT

EXPORTING

NAME   = ‘CONTEXT_ELEMENT’

RECEIVING

VALUE  =  CONTEXT_ELEMENT.

context_element->set_attribute( name = ‘TABLE_POPIN’ value = wd_popin->id ).

 

Also add close action for the table popin

 

 

 

 

  Data:SELECT_ELEMENT      type ref to if_wd_context_element.

  CALL METHOD WDEVENT->GET_CONTEXT_ELEMENT

    EXPORTING

      NAME   = ‘CONTEXT_ELEMENT’

    RECEIVING

      VALUE  =  SELECT _ELEMENT

      .

SELECT_element->set_attribute( name = ‘TABLE_POPIN’ value = ” ).

 

Once you add these methods , on running the application and clicking on the link , the table popin will appear as follows. 

    

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      Hi,

      The blog is really informative.

      Thanks for a nice blog.

      Author's profile photo Former Member
      Former Member
      Good.
      Author's profile photo Felix Baumann
      Felix Baumann
      The Blog is informativ, but during the binding the attribut M_View is used. Where this one is defined an bound is not clear. Can you please explain wher to implement this one.

      Regards

      Felix