cancel
Showing results for 
Search instead for 
Did you mean: 

Add methods to standard interface

Former Member
0 Kudos

Hello,

I am on EP7.0 ERP05 NW04s and trying to modify standard ESS applications. When we create a webdynpro application there are certain standard interfaces defined in the Navigator -> gen_wdp -> packages -> com -> sap -> <Application name> -> wdp -> <IPublic <Application name>Component >interface .....I want to know whether we can add methods to this standard interface for our requirements ...because on the top of this file there is a statement like :

This file has been generated by the Web Dynpro Code Generator.

// DO NOT MODIFY! CHANGES WILL BE LOST IF THE FILE IS REGENERATED.

Any help would be highly appreciated.

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

Ashwani,

The Webdynpro Component Interfaces node is blank for this application and has no definitions inside it ....

and I am already in the Webdynpro perspective ....

Please help.

former_member186016
Active Contributor
0 Kudos

The component interface definition might be coming from some dependent dc's.

Regards,

Ashwani Kr Sharma

Former Member
0 Kudos

Hello,

Thanks for the reply. But here in his class I cannot just declare a method but if I define the method it uses certain context elements which are not there for this component....

Please help.

Former Member
0 Kudos

Have you switched to Webdynpro perspective as mentioned above by me.

former_member186016
Active Contributor
0 Kudos

Yes..

Go to the implemented interface node. Check what component interface definition the component imlpements.

The method will be in one of the component interfaces definitions.

Regards,

Ashwani Kr Shrma

Former Member
0 Kudos

Hello Ashwani,

If I goto the Interface Controller and open it, it is actually a class where I have to define my methods not just declare but what my requirement says is to declare a method in that standard interface I told you about in my first post.....which is inside the Navigator-> gen_wdp folder..

Please help.

Former Member
0 Kudos

Hi

Switch to webdynpro perspective Window->Open perspective -> webdynpro and then double click on the interface controller, then add the method.

Regards

Ayyapparaj

former_member186016
Active Contributor
0 Kudos

Hi,

The classes in gen_wdp are generated from the web dynpro metadata. You cann't change the generated classes.

You can change web dynpro metadata via editors. The classes will be generated according to them. Add method in the Editor. The corresponding geerated class will have the method added to it.

Regards,

Ashwani Kr Sharma

Former Member
0 Kudos

Ashwani,

I guess i am having a hard ime understanding this but when I goto he component ->Component interface ,double click it or right click it nothing happens and I dont see any component interface definition for it...Please help.

Subhash

former_member186016
Active Contributor
0 Kudos

Hi,

I think its better if we go pictorial way

Please follow this tutorial

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/d5c09c90-0201...

Go to page 9 of this tutorial.

Expand the tree for Component Interface.

Under that there will node interface controller double click on this node.

For Component Interface Definition:

From root... see the node Web Dynpro Component Interfaces

Under that there will listing of component interfaces. Expand that node and double click on interface controller node.

Best Regards,

Ashwani Kr Sharma

Former Member
0 Kudos

Ashwani,

Thanks for the reply again . But when I double click on the component interface ,nothing happens and no editor opens for it .I goto Webdynpro components -> <Component to modify> -> Component Interface ....

Please help.

former_member186016
Active Contributor
0 Kudos

Each component has a local component interface definition attached.

You can open this by Webdynpro components -> <Component to modify> -> Component Interface. Right click on the node and open option to open the editor.

The component can also implement additional component interface definition. If it is like this in your case then you have to open the editor for component interface definition. For this in explorer go to component interface definition node. You will have component interface definition listed. [The implemented component interface definition can be part of other dc also] Riight click on the component interface definition and open the editor.

Regards,

Ashwani Kr Sharma

Former Member
0 Kudos

Hi Ashwani ,

Thanks for the reply. I had gone to the the Component Interface I have to modify but don't see any Webdynpro editor for it.....Please explain

Looking forward to your help.

former_member186016
Active Contributor
0 Kudos

I said Web Dynpro editor just to differentiate with simple java editor.

If you double click on the component interface and editor will open up where you can specify the methods,actions,etc for component interface. The editor is specific to Web Dypro and hence i referred to it as Web Dynpro editor.

Technically its a controller editor for the controller attached to the component interface.

Hope it helps.

Regards,

Ashwani K Sharma

former_member186016
Active Contributor
0 Kudos

Hi Subhas,

You cann't directly edit this file. This file is generated from component interface definition.

In the web Dynpro explorer look for the component interface for which you want to make changes. Open the web dynpro editor for it. You can add the methods here.

The file which you are currently referring will have the method automatically generated.

You can add code between //@begin //@end tags. These are coding areas which are not altered when the generation is called.

Regards,

Ashwani Kr Sharma