Runtime Polymorphism / Dynamically load components in Web Dynpro for ABAP

...Previous

Now create Second component:

You can create the second component in the same way as first one created. I am just describing the steps.

1.     Go to SE80 again and Select “WebDynpro Comp./Intf” from the list.

2.     Give the component name as SUB_COMP2.

3.     Go to the main view and creating one Group UI element for component1. Put the text (Caption) as Main view for component ZSUB_COMP2.

4.     Delete the default window.

5.     Now double click on the component and go to implemented interface tab.

6.     Put the interface name and click enter button.

7.     Now clicks the Re-implement button to implement the supper Web Dynpro interface class.

8.     One success message will come after implementation.

9.     Now save this component. One inherited window will appear in this component; this is interface view of the ZINF_TEST component.

10.  Now embed the main view in the COMMON_WINDOW.

11.  Save and activate whole component.

In this way we can crate multiple components.

Now create one ztable (ZCOUNTRY_COMP).

1.     Go to SE11. Select Database table radio button and give table name ZCOUNTRY_COMP.

2.     Press crated button.  And fill the attributes as given below:

3.     Go to Maintain Technical setting and do the following changes:

 

4.     Make enhancement category as deep:

5.     Now activate the table and go for data entry from data browser.

6.     Fill the table with following data:

Note: If you have created more sub component then you have to add more.  

Now Crete main Component:

1.     Go to SE80 again and Select “WebDynpro Comp./Intf” from the list.

2.     Give the component name as ZMAIN_COMP

 

3.     Now go to the component controller Context  tab and crate one context node COUNTRY_COMP.

 

4.     Now clicks on add attributes from structure button and select the  following fields :

5.     Now double click on the component and go to used component. Inset the interface name.

6.     Now go to Component controller and select the properties tab and click create controller used button and select highlighted component. Do the same thing in properties of view MAIN.

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