cancel
Showing results for 
Search instead for 
Did you mean: 

interface controller implementation

Former Member
0 Kudos

Hi

i have two component controllers i iwant to call ametod from compenent controler1 to commponent controller2 using interface controller,can you please explain it with sample example.

Thanks

Kumar

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Rahul

Please check this PDF link

Hope it will help you

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0ba2c45-0518-2a10-73be-9b785e10...

Regards

Ruturaj

Former Member
0 Kudos
lokesh_kamana
Active Contributor
0 Kudos

Hi,

Check the document available in this link it will be usefull to you

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f07c3625-c971-2910-3a9c-ce131487...

Thanks & Regards,

Lokesh

lokesh_kamana
Active Contributor
0 Kudos

Hi,

Create a method "sample" in the component controller.

And call the same method in the interface controller.

step1:- Go to properties tab.Under Required Controllers section.

Click on Add Button

step2:-Add the particluar component in this tab.

Step3:-create another method in the interface controller and call the method created by you in component controllerin this.(since you cannot call the method in the component you have only access for interface controller.)

Suppose sample is the method craeted by you in compnent controller.

Create Sample_interface in the interface controller.

And call the method like this.

wdThis.wdGet<Comp name>Controller().sample();

Create a public part(DCMetadata->Public parts>right Click->New Public Part)

Give the name

select the type(webdynpro component)

And select the component craeted by you.

Now the public part is ready to use in the other component(Build it)

Things are completed for the 1st component.

2nd Component:-

Add the 1st component public part used by you.

DC Definitions->Used DCs-->Right clcik -->add used DCs

And add the public part created by you here(i.e the public part created by you for the component).

And add the same now in Used webdynpro componenents.

Right click--->Add Used Components.

A popup will be dispalyed in the Add Used Webdynpro Components there is a browse button).

Slecet the component and give some name for it and press finish.

Now go the componenet controller.

GO to the properties tab.

Press Add button you will fing tjhe webdynpro component usage.

Under that you will find the interface controller of the first component.

Select it and press ok.

Call the method now.

like this

wdThis.wdGet<Name>Interface().sample()

Thanks & regards,

Lokesh