Thursday, June 27, 2013

How to Debug in SAP NWDS

More often I need to debug the custom action classes written in Java to mend some of the standard action flow. During this course of changing the action flow of the application, I need to debug my action classes many times to see if the things are falling in place or to remove bugs.

I found out every time, I go for debugging in a new client environment, its always a challenge initially. So I decided to write some notes to myself on this.

For any SAP J2EE server to enable debugging we need to follow following steps:

1. Enable debugging at the server level using the configtool if the server bellow 7.3 version. In case the server is 7.3 or higher then this can be done by going to the MMC perspective in the NWDS 7.3 and enabling the debugging option from there.

2. Ensure in versions below 7.3, that the config tool has different port entries for Instance level debug settings and Server level debug settings. I faced this issue and it took me almost 4 days to figure that out.

3. Next is to put the breakpoint in the Java code and configure the debug settings for the class.

THATS IT!! you are ready with your debug session.... Happy Debugging :)




Tuesday, September 13, 2011

Modifying the SAP Biller Direct (UCES) Application…

 

 

Hi friends, recently I worked on an

interesting J2EE application Biller Direct (UCES) from SAP in Utilities module.

 

I found many doubts and queries on how to go about making changes to this application so here is my attempt to answer those.
The application is delivered in a .sca form by SAP as any other standard SAP component on the J2EE stack.
All we need to do to modify this application for various purposes like branding ,customizing processes ,or sometimes add new features, is to
Unfold the .sca files delivered by SAP.
Put them in proper form of a J2EE application.
Make the necessary changes and build the project and deploy it to the server.

 

Installation of UCES as a local project

1. Download SAPUCES602_SP02.SCA

  • At first download file SAPUCES602_SP02.SCA

2. Unpack the files

  • Upack the file either with clip_image002or after renaming it as ZIP
  • Upack the file is~uces~ear.sda in sub folder \DEPLOYARCHIVES in the same way
  • This results in folder \META-INF and file sap.com~is~uces~war.war

clip_image004

  • Unpack the file sap.com~is~uces~war.war after renaming it as ZIP

clip_image006

3. Create the WEB-Project

  • At this stage, a „Web Module Project“ has to be created in the Developer Studio.

clip_image008clip_image010

  • The name of the project can freely be selected. It is advisable to make use of abbreviation „web“.
  • The path in which the project is created can also be freely selected. By default it is created in the folder \workspace.

4. Copy the files

  • Now copy the entire content of folder \WEB-INF of the unpacked sap.com~is~uces~war.war into folder \WEB-INF of the project directory.
  • The remaining folders (not only their content!) has to be copied into folder \webContent of the project directory.
  • The files index.htm, readme.txt and start.php don’t need to be copied

5. Create the Enterprise Application Project

  • Create an „Enterprise Application Project“ in the Developer Studio.

clip_image012 clip_image014

  • The name of the project can freely be selected. It is advisable to make use of abbreviation „ear“.
  • The path in which the project is created can also be freely selected. By default it is created in the folder \workspace of the Developer Studio.

6. Copy the files

  • At this stage all files except for application.xml have to be copied out of the unpacked folder \META-INF into the folder \META-INF or the EAR project.
  • The file application.xml has to be kept as the original file of the project.

7. Further steps in the Developer Studio

  • The projects need to be refreshed in order to enable the Developer Studio to recognize the files, that have been copied into the projects
  • Do a right mouse click in the Package Explorer onto the project and select the „Refresh“ option. Run this step both for the WEB and for the EAR Project.
  • Next add the WEB Project to the EAR by doing a right mouse click onto the EAR Project in the J2EE Explorer and select „Add Modules“ to add the WEB Project accordingly.
  • Now the EAR Project should be established by doing a right mouse click and selecting „Build Application Archive“. Here a WAR-file is automatically generated in the WEB project and an EAR-file in the EAR project.
  • The EAR file can be deployed by doing a right mouse click and selecting the „Deploy to J2EE engine“ option.

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!!!

Sunday, May 01, 2011

How SAP J2EE happened to Me!!

Here I am with another entry to blog after a long time. When I joined IBM back in 2008 and landed into the world of SAP, I really thought is it something that’s gonna fancy me in a long run….I was in dilemma for sure.

                                                             imagesCAMURMR9

I personally found ABAP quite boring and typical, I guess that’s a drawback of doing professional courses in Information Technology. Ever since I started my education + career path which involved languages like C++,C,Java,VB and C#, I have always been taking challenges. Challenges like Database connectivity, memory management etc.

But as they say there is a light at the end of every tunnel…..just pray its not a train!, and thanx heavens it wasn’t a train in my case. I was like asking everyone around, all my seniors, “is there any chance I can work on something better?”, like I always knew what is better than SAP ABAP in those days,but I only knew one thing for sure this (ABAP) is not something I would want to all my life.

One fine day my Team Lead walked upto me and said would you work in Java into SAP? wow that was a one day in IBM I felt like charged up. My reply was obviously yes, eventually as no one was opting for the path of being SAP ABAP + SAP J2EE developer, I was an easy pick for the opportunity.

“The only time you run out of chances is when you stop taking them.”, I like this quote a lot. Cause I took this challenge of working as an SAP J2EE + SAP ABAP guy into a project. I felt really proud of my self until I realize I am into SAP and understanding of business processes and the functionalities you are no technocrat Smile.

So here I was left with bunch of problems to solve, with a very new application by SAP i.e. Internet Sales Application on top of their CRM solution.

I started learning this thing and was provided with mere 1 month of time to expert it. I mean working hard is something I love but with no partying harder it was hard!!

I survived that phase and now I am enjoying the fruits of it by working on applications like SAP ISA,IPC and UCES. Yes UCES is yet another J2EE based ready to use solution by SAP for paying utility bills online and stuff like that.

To I really feel working in SAP ABAP as well as its growing the way it should and problems like memory management, and database connectivity is no distant dream.

ABAPConsultantsLifeCycle

The best part is now a days its more Object Oriented, but having moved on, I wonder I will have a Team Lead now to request to for a better challenge……!! Inspired From This Developer Life!

Tuesday, March 09, 2010

Activating a Super User In SAP NetWeaver Administration

Activating SAP Super User

NetWeaver Administration
SAP* is the SAP super user. It is activated in cases where an administrator has forgotten the Admin password and system is using Java user management engine (UME).
1. Start the Config Tool C:\usr\sap\sid\instance\j2ee\configtool\configtool.bat.


2.Switch to configuration mode by clicking on "Pencil" icon


3.Navigate to cluster_data -- server -- cfg – services


4.Click on Property sheet of com.sap.security.core.ume.service


5.Select properties:
ume.superadmin.activated = True
ume.superadmin.password = any pasword you want




6.Save and restart Java Engine.


7.Now login with user id sap* and password at http://:/useradmin/index.jsp or Visual Administrator



8.Search for Administrator user in the user store


9.Search for Administrator user and reset its password







10. Now deactivate SAP* by following above steps except for setting ume.superadmin.activated as False. You won't be able to use any other user besides SAP* until you deactivate this feature. As always back up the config database and restart the server when appropriate.

Thursday, October 19, 2006

Take Away at BarCamp.........

Hello Friends !!! well this is first time I am writing something like this .........something called blog(???) ........guys here I want to tell you what happened with me after the second BarCamp I attended in Pune held at Symbiosis campus. (Well if some of you are not at all aware of what this BarCamp means you guys can check this link out http://barcamp.org/BarCampPune ).

So after attending this BarCamp thing me and my elder brother were supposed to move to his in Laws for dinner....yes we did go over there and had it , it was definitely good as it is always (????) after that it was my elder brother Sarang who was driving me back to home......

After having chat on regular stuff suddenly he (Sarang !!) asked me "So how was the Barcamp ?", I said, "It was great!"......then came the question which made me write something like this... He asked, "Sameer what was the Take Away ???" Now it was me giving a typical answer any Tom Dick and Sameer would have given ..."ummm It is I learned so many new technologies like .....", but no!! when he (I dont need to mention!!!) asks me something it is a rule my first answer I throw at him is to guess what he expects the answer to be!!!........"Sameer I dont need to know what you got learn I am rather interested in what the Take Away was????", asked HE........Now plz I always run out answers when I dont understand what my elder Sibling wants....."Ummm what ? ya umm it was many people I got to interact !!!", I answered the last one I had now nothing remains the ball was in his court...."sameer think again was it just meeting new people !! or learning new technologies explored by them you had as a take away??? think and answer !!!",Said HE....[:(] I was screwed....I thought really hard and finally I said ," It might be the wrong one again but I think the Take Away is I learned you should gain knowledge in such a manner that it should be presentable to others or it should benefit someone !!!! " Bingo I was damn right about it this time according to my Bhai (yes off course my elder bro...) , and there I was with a feeling of how sometimes these elder brothers show the best things in us, hidden somewhere never explored by us!!!.....And he made me aware that you have it!... just open it up and its all yours ...... I love my dear brother thanks to him!!!