Ads

Webdynpro ABAP ALV Report

Webdynpro ABAP ALV Report

Webdynpro ABAP ALV Report, is a first challenging thing for every new webdynpro developer to create components of webdynpro since ALV report creation is different from the ABAP applications so that From this lesson ,we will learn ,how to create simple ALV report using webdynpro component.

1.Go to SE80 transaction code and create the webdynpro component and assign it to your package and save it in local object.

Webdynpro ABAP ALV Report
Now ,select the ZDEMO_ALV component for that add the standard SALV_WD_TABLE Table component in the Used Components section .
Webdynpro ABAP ALV Report

Go to the context tab of componet controller and create context node and attributes

Webdynpro ABAP ALV Report
Enter node name and select it from dictionary structure and enter your required node properties and select Add attributes from structure.
Webdynpro ABAP ALV Report
Select the required fields of structure of EKPO. 
Webdynpro ABAP ALV Report
Context node attributes will be created 
Webdynpro ABAP ALV Report
Create the controller uasge in the properties tab of the V_main section.
Webdynpro ABAP ALV Report
Double click on the interface controller to create a component usage with controller access.
Webdynpro ABAP ALV Report
Controller usage has been created like below controllers

Two methods has been created in the interface for the view controller.
Webdynpro ABAP ALV Report
Now,go to the V_main and click on layout tab and right click on add new ui element and select the insert element to create view container ui element.
Webdynpro ABAP ALV Report

Give the ID and type for view container element.
Webdynpro ABAP ALV Report
Now ,view container has been created.
Webdynpro ABAP ALV Report
Now ,from the ZDEMO_ALV component,select the W_main and we have to configure now view of ALV component to  view container ui element.
Webdynpro ABAP ALV Report
Now give the details of  view to be embedded and component of view and component use name.
Webdynpro ABAP ALV Report
Now,view of Table component embedded into view container .
Webdynpro ABAP ALV Report
Now,click on the components usages heirarchy and select the data node of context and click on the controller usage button.
Webdynpro ABAP ALV Report
Now ,we have bind the our context node EKPO to DATA node of context of the table component .

Now ,drag and drop the Ekpo node to Data node ,then binding has been created between two nodes.


Now ,you can observe binding symbol in the below image.

Webdynpro ABAP ALV Report
Now go to do in it method of component and select the EKPO node and select the radio button as set and select the check box as table operation 
Webdynpro ABAP ALV Report
Then ,default code will be generating ,replace it with this below code.


Data:Lo_nd_ekpo type ref to if_wd_context_node,
        Lt_ekpo type wd_this->elements_ekpo.
lo_nd_ekpo = wd_context->get_child_node( name  = wd_this->wd_ctx_ekpo).

select * from ekpo 
into corresponding fields of table lt_ekpo
up to 4 rows.

lo_nd_ekpo->bind_table(new items = lt_ekpo set_initil elements = abap_true).



Save and active the whole component.then right click on our webdynpro component and create web dynpro application.
             
Webdynpro ABAP ALV Report

Now ,you can see the output like this.
Webdynpro ABAP ALV Report
Now ,we have finished the create webdynpro abap ALV report .

Comments

Popular posts from this blog

BADI Interview Questions in SAP ABAP

Sample SAP ABAP Programming Examples for Practice

Module Pool Programming Interview Questions and Answers in SAP ABAP

Step by Step tutorial on BDC Session Method Program in SAP ABAP

SAP ABAP Interview Questions and Answers for 10 Years Experienced