cancel
Showing results for 
Search instead for 
Did you mean: 

how to view COMPONENTCONTROLLER interface 's implement class

Former Member
0 Kudos

Every WDA has COMPONENTCONTROLLER ,and it has interface, How to view class implemented this interface?

Accepted Solutions (1)

Accepted Solutions (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

WDA is stored as meta data, there are no objects generated in the system when you activate your web dynpro component, the classes are generated at runtime only

Abhi

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> WDA is stored as meta data, there are no objects generated in the system when you activate your web dynpro component, the classes are generated at runtime only

>

> Abhi

Actually that's not true. The interfaces get built as you are editing the component and compile like any other class when you activate. They are just hidden from the class builder to keep people from messing around with them directly and to keep from cluttering up the object navigator. They have to be built as you go otherwise SAP would have had to build a special syntax checker and code parser for the ABAP Code Completion for WDA (which we didn't do).

You can view the interfaces however. There is a button on the toolbar (or you can press CTRLSHIFTF1 or the menu path GOTO->Controller Interface).

http://www.flickr.com/photos/tjung/2740591187/

It displays the interface in a dialog window:

http://www.flickr.com/photos/tjung/2741429324/

Also in ABAP 7.1 and higher, the interace is also visible via the code completion via the implementation of the interface in WD_THIS.

http://www.flickr.com/photos/tjung/2740610915/

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Thanks for correcting me.

I was under the impresion that this code is also a meta-data, and at runtime the using this data framework generates class

http://www.flickr.com/photos/tjung/2740610915/

this is really awesome, ABAP editor lacks this functionality currently where most of the .NET and JAVA IDEs already have this

alejandro_bindi
Active Contributor
0 Kudos

Although they're not meant to be modified directly, there are ways to access the underlying implementation class for display. One of them is to do an extended check on the component (SE80 -> Menu "Web Dynpro Component" -> Check -> Extended check).

You'll get a class pool name, for example:

/1BCWDY/60X4PUQ2SJIR41V7JI9M==CP

Copy all of it without the ==CP ending and you can open that in SE24. In Implementation section you have the includes for each component section.

There are times when you need to access that underlying code. For example, where I work at we need to do code reviews. It's simple and a LOT faster to search for specific statements on the whole class, rather than go method by method in the component (which doesn't have global search functionality).

Do you know Thomas if this will be implemented some time?

Anyway, i must repeat that you shouldn't attempt to modify that code by any means. Leaving component editing before accessing the code is desirable also.

Regards

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> There are times when you need to access that underlying code. For example, where I work at we need to do code reviews. It's simple and a LOT faster to search for specific statements on the whole class, rather than go method by method in the component (which doesn't have global search functionality).

> Regards

Actually you can already do this. Just go to your Workbench settings and uncheck Method Based Editor on the Web Dynpro tab:

http://www.flickr.com/photos/tjung/2741523889/

Now when you go into any of the Web Dynpro objects, you will have an additional Implementation tab. It shows you the whole class interface as well as all of the method implementations inline. I would suggest this for your code reviews - and now you can use a search across all methods as well.

http://www.flickr.com/photos/tjung/2742361188/

I just realized that when I took the screen shot I was in display mode - but this is a code editor as well - so that isn't some kind of limitation of this mode. I just happened to have been in displaay only mode - and I'm feeling too lazy this afternoon to upload a new image

alejandro_bindi
Active Contributor
0 Kudos

Great! This option saves some time.

Thanks for pointing it out.

As for your laziness, don't worry - it must be some kind of virus as I seem to be infected too! 😛

Regards

Edited by: Alejandro Bindi on Sep 18, 2008 6:24 PM:

Just posting back to warn others not to use the Implementation editor mode to modify the coding...at least not up to SP12. It has a bug with the heading comments, lost half of my code and also all the method descriptions including the standard ones for WD* methods. I had to roll back to the last version to fix it.

former_member182429
Active Participant
0 Kudos

Hi Thomas,

I realise that when the Implementation tab is there, and when you try to activate your code with some syntax error inside, the line number that pops up in the error message does not correspond to the line number shown in the Implementation tab.

Is this a known issue?

Answers (0)