Monday, May 30, 2011

Creating a Simple Web Dynpro App with ALV


Creating ALV in Web Dynpro ABAP.

This tutorial will give you step by step approach to create a simple ALV table in web dynpro abap.

1. Go to transaction SE80





2. Select object type as Web Dynpro Comp/Intf.





3. Give some name in the below box and press enter.



4. Pop up will come select Yes there.


5. Object as Local object.



6. It will create a new web dynpro component as shown.


7. Double click on the component name and there in the used web dynpro components list
Add SALV_WD_TABLE

component.

Go to the component controller and there create one node . give its name and cardinality

0..n
And in the dictionary structure give the name of some database table.
In the example here I have used Zdealer one

custom table that I have created.
After that click on the ‘ADD attribute from the structure ’. and the fields from the screen
Then press enter, attributes will be added to the node.
also















9. Then give one supply function in the node’s properties. FILL is the supply function created

here.



9. Go to that supply function and write the logic to fill the node.
Here I have written simple logic to fill it with all the entries of the table using the select *
Statement.
10. Now go to the

interfacecontroller usage created for the used web dynpro comp.
There go to context and click on controller usage.




11. There select the component controller from the popup and then map the node Dealer (which was

created earlier) to the DATA node




12. Go to the view controller of main view there add the UI element

ViewContainerUIElement.
And save everything.





13. Now go to the window and there right click on the viewcontianer added in the last step and

Select TABLE view of component SALV_WD_TABLE from there.






14. Save everything and activate.



15. Create one application for the component.




17. Right click on the application and test it. Browser will open and show you ALV filled with all the entries

of the table (in this case it is ZDEALER).







that is done....

we will discuss about more things related to ALV in webdynpro abap in next posts


thanks :)
Gill


1 comment: