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.
Now ,select the ZDEMO_ALV component for that add the standard SALV_WD_TABLE Table component in the Used Components section .
Go to the context tab of componet controller and create context node and attributes
Enter node name and select it from dictionary structure and enter your required node properties and select Add attributes from structure.
Select the required fields of structure of EKPO.
Context node attributes will be created
Create the controller uasge in the properties tab of the V_main section.
Double click on the interface controller to create a component usage with controller access.
Controller usage has been created like below controllers
Two methods has been created in the interface for the view controller.
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.
Give the ID and type for view container element.
Now ,view container has been created.
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.
Now give the details of view to be embedded and component of view and component use name.
Now,view of Table component embedded into view container .
Now,click on the components usages heirarchy and select the data node of context and click on the controller usage button.
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.
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
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.
Now ,you can see the output like this.
Now ,we have finished the create webdynpro abap ALV report .
Comments
Post a Comment