Hi, I provide training in SAP UI5. Also feel free to checkout my new web page https://saptechblog.com
Webdynpro ABAP

Table UI Element

Table UI elements are used to display the set of data in the form of report.

 

Scenario: In this tutorial we will generate a simple report using the table UI element.

 

Step 1: Go to SE80 and create a Webdynpro application as shown below.

 

clip_image002

 

Step 2: In the context tab of the view controller, Create a context node EKKO with cardinality 0..n.

 

clip_image004

 

clip_image006

 

Click on Add attribute from structure to add the attributes to the context node from the dictionary structure EKKO.

 

clip_image008

Select the attributes required and press enter.

 

Context node will be created as below.

clip_image010

 

Step 3 : In the layout tab of the view controller insert a table UI element and Bind the node to the Table.

 

clip_image012

 

clip_image014

 

 

clip_image016

 

 

Right click on the table UI element and select create binding.

 

clip_image018 

 

clip_image020

 

Click on the context button and choose the context node ekko as shown below.

 

clip_image022

 

 

 

 

clip_image024.

 

Press enter.

 

clip_image026

 

 

 

Step 4: Go to the method WDDOINT and set the context node with some records. The values in the context node will be displayed in the table.

 

Using Code wizard clip_image028 set the node EKKO as table Operation.

 

clip_image030

 

Following codes will be generated by the code wizard.

 

clip_image032

 

Modify the code as below.

 

clip_image034

 

 

 

Step 5 : Save and activate the component. Create an application and test the application.

 

clip_image036

 

Output:

 

clip_image038

About Arun

2 Comments:

  1. ls_ekko is not an internal table error

    ReplyDelete
    Replies
    1. Yes ofcourse.. LS_EKKO Is not an internal table. In my example I have mentioned LT_EKKO which is declared as internal table. Make sure you the code wizard with the table operation checked.


      Regards,
      Arun K

      Delete

Powered by Blogger.