Dynamic creation of component usage in ABAP WebDynpro

...Previous

6.     Now got to the window and there by right clicking on the ViewContainerUIElement Header_alv click on Embed_view and there choose the table view of SALV_WD_TABLE.

 

7.     Now in layout tab of main view create appropriate UI element as shown in below screen shot.  

In the Input element we will be giving the VBELN as input and on clicking of button Show primary ALV will be displayed on ViewContainerUIElemenrt HEADER_ALV.  

On the onAction property of button ‘Show’ we have created an action named SHOW and a corresponding method names ONACTIONSHOW has been created automatically.  

8.     Go to the context tab of the view main and drag and drop the context node of component controller to the view’s context.  

9.     In attribute tab add one attribute as follows.  

10.  Now go to the method ONACTIONSHOW and write the below logic for fetching the data to be displayed.  

11.  By doing this till here your primary screen will be coming happily on clicking of ‘Show’ button. Create a webdynpro application and test it. It will look like below

Creation of Dynamic Component Usage:  

12.  Now if we want to click on one row of ALV and want the secondary list to be displayed we have to use the Hotspot technique of ALV. Hotspot technique is about creating one column in ALV as hotspot. By clicking on that column’s value ONCLICK event of ALV will be triggered and further defined code will trigger.

13.   In order to define the hotspot in our ALV, we need to do further coding in ONACTIONSHOW method itself. Below is the screen shot of code which is pretty self explanatory  

Click here to continue...

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image