Wednesday, June 22, 2011

SAP CRM WebUI–Locating the bsp components of a bsp application.

Having said I am a beginner in the SAP CRM WebUI Development, I am from today starting to blog a lot of the new stuff I will be learning as a part of my daily work…Hope you enjoy it!!

To begin with I am going to share my experience to locate the BSP Components deep down, as I believe most of beginners will seek this kind of step by step guide with screen shots…

So in order to get started, first launch the SAP CRM WebUI Application in the internet explorer, e.g. I will be using an application for searching market segments or it’s also called the segment builder search…

clip_image001

Then select a component that you wish to find technical details about and press F2 button (for this you will need to have developer role authorizations in SAP CRM)…this will result in a pop-up like bellow. The pop-up gives all the technical details about the view of the application to help us find more details in the SAP CRM.

clip_image002

Now go to SAP CRM (backend), and launch the transaction BSP_WD_CMPWB it’s the BSP components webdynpro workbench which facilitates us to work on almost all aspects of BSP Components such as Views, Controllers, Custom Controllers and the Models(Context).

clip_image003

Once launched the BSP WD Workbench will look something like this…

clip_image004

As shown above enter the component name we located by pressing F2 on the WebUI application component in the Component Input box of the selection screen, similarly we can also enter the Enhancement spot which also was located in the press F2 method.

Sometimes it may so happen that the default view of the component will be launched with the BOL Model Browser as shown below. The BOL Model browser gives us the details of Business Object Layer details…for this tutorial I am keeping things simply to get to the code of the search button on the application.

clip_image005

So in-order to locate the code we will have to navigate to the Component Structure Browser….Here we can find some useful details about the component such as views, windows etc….Select view (unfold)

clip_image006

As unfolded the View option in the left hand side pan, we can see three different views among them the first one is the one which we are looking for….once selected further details about the view will be loaded into the pane on the right hand side.

clip_image007

Unfold the EvenHandler menu item and you will see multiple events, among these the EH_ONSEARCH is the event which resembles our search button click functionality. But to confirm it just double click the event –> go to the code put an External Breakpoints in the code and see for yourself… clip_image008

clip_image009

Well apart from the View Structure Tab I would also like you to take a look at the Configuration tab which shows and enables us to set the elements displayed on that particular view…

clip_image010

If in case we need to modify the code in any of the event or model we must do so by enhancing the component. To enhance the component means to create an inherited new custom (Z or Y) class which has base class as the class for the component.

This off-course does not involve efforts of creation of class due to some tooling SAP CRM has provided, all we need to do is select the view component and click on the Enhance Component button at the top menu. This will ask for a new class name and that’s it!! You have just created your own custom component in the same application with which you can make modifications according to your needs…

clip_image011

Enjoy!!!

No comments: