Find Web Dynpro Class Name to Search in ABAP Code
To make code search (Find) in SAP Web Dynpro component codes is not easy as SE38 ABAP Editor screen. Web Dynpro programmer has to search in each action or event method to make search to find specific text.
Fortunately cl_wdy_wb_naming_service class get_classname_for_component static method enables ABAP developers to get the class name of the related SAP Web Dynpro component to make a direct code search like Find function within class codes.
Call transaction SE24 Class Builder: Initial screen tcode.
And enter the class name CL_WDY_WB_NAMING_SERVICE in the Object Type input area.
If you Display cl_wdy_wb_naming_service class, you will see that it has a static method named GET_CLASSNAME_FOR_COMPONENT which is used for to supply the implementation class for a Web Dynpro component.
Press F8 to run the naming service class. ABAP programmers will see the following screen which enables them to execute static methods.
Execute method get_classname_for_component by pressing the icon following the method name.
Enter the Web Dynpro component name which you want to learn its class name in the P_COMPONENT import parameter area.
Knowing the class name will help ABAP developers to search within ABAP codes of the Web Dynpro component.
After WebDynpro component name is entered, execute the static class method cl_wdy_wb_naming_service->get_classname_for_component by pressing F8 shortcut key. The output will be the class name for the Web Dynpro component as follows.
After the Web Dynpro class name is obtained from the cl_wdy_wb_naming_service->get_classname_for_component static method, return back to SE24 tcode initial screen.
Enter the Web Dynpro component class name in Object Type text field and press Display (F7) button.
At this point using the Find button ABAP programmers are able to search specific text patterns to find the places where they are used within the Web Dynpro codes.