I was breaking my head for the past couple of days to set this connection up. After referring to multiple articles and SDN references, I felt weird because none of the SDN was able to solve the problem except for myself. So, I decided to put this down in my blog so in future, any beginner like me will be able to resolve the problem by looking here.

To start with, you need to figure out the right NWDS version. It may looks like a simple thing but you will never be able to deploy and test your code. Then, you will have to start all over again. For eg, for NetWeaver 7.0, you need to install NetWeaverDS 7.0.x in your machine, followed by JDK 1.4.2 (??!!). Stupid, but yes. If you link two unrelated versions, you may get the following error:

There is no component either in SDM repository or in Deployment batch that resolves the dependency.
dependency:
 name: 'tc/aii/base/offline/facade'
 vendor: 'sap.com'

If you are using the latest version (7.3), you will have straight forward configuration in your Window -> Preferences. You can easily configure SAP Web AS over there but its not the same with previous versions. I’m going to take you through a set of steps with which, I guess you can easily configure. For example, we will take the tough one first, NWDS 7.0.11 connecting to a remote J2EE machine.

  1. First follow the instructions in http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/100dac80-f93c-2a10-15a1-a9ac1fd3166c?overridelayout=true
  2. Now, the problem is, people may keep following error and there are no straightforward fixes.
    [001]Deployment aborted
    Deployment exception : Cannot determine sdm host (is empty). Please configure your engine/sdm correctly !
  3. The key is, if you have configured correctly, you will see the image like below at “J2EE Server” section:
  4. If not, then its clear the configuration is wrong. Now, how do you figure out the message server port number. The easiest way is, ask you BASIS guy. If they don’t know, as them to open MMC console and look at logs of SDM module. The message port number specified in the SDM module is the right port number. Don’t be followed by standards given by other folks like, 39/36 + instance number (01). As you can see from above, the instance 01 is having 3900 as port number. So, its always better to have a look at configuration GUI or the logs.

So, once you get the right port number, you are good to go. As I said previously, you just need to check on the J2EE server tab to see if SDM is shown and all is GREEN.

Configuring NetWeaver DI 7.3 is very easy. Go to Window -> Preferences in NWDI. Choose SAP Web AS on the left nav and configure your SAP EP machine on the right. It doesn’t even ask for port and configures all by itself.

That’s it folks, have a great day.

Ok, I’m not a big blogger, so I’m gonna keep this thing real short.

I happen to meet a bunch of software engineers who are really new to the industry and I saw their mistakes, which I did at the beginning of the career. Lets cut to the chase. This is my simple advice if you are a software engineer trying to tune yourself up.

  1. Always indent the code
    Why? I mean, when you have a load of tasks to complete, why would you spend time on indenting? Two things to note here – a) you wont be able to debug your own code. b) No one likes to support your code later.

    Overview of unindented vs indented code
    unindented vs indented code
  2. Import or include libraries only you use
    I have seen people using java.util.* for using a HashMap. Ok, let me make this clear – loading classes with asterisk DO NOT load the actual classes in memory thereby consuming more memory. This is just a way to tell compiler where to look for it. So, why do we want to do that if thats the case? This is the clear way to tell others what libraries or classes used by your program.
  3. It’s not what you write. It’s how you write.
    Use proper language specific standard for defining variables, methods, classes, etc. Understand this – anyone can write a program but programmers write a good one. Also, use meaningful variable names. There is difference between using a standard and a meaningful name. For eg: Say, you are using lower case key for a particular operation “lKey” is ok but “lowerCaseKey” makes sense for that variable.
  4. You already know how to write a simple program. For everything else, there is Google.
    Always depend on Google. Not on the guy/gal who sits next to you. Dependency will cause two main problems a) you will not learn a thing. b) The other person’s time is wasted, eventually.
  5. Put yourself in client shoes
    Don’t stick yourself to the requirement document. Always, think how would you react if you happen to use that site and suggest client about improvements, constantly. Not only this helps bring up a good application at the end, but also improves client confidence with you.
  6. Prefer object orientation
    Object Orientation is the best approach to programming till now , which is why, even interpreter languages switch to object orientation. The benefits are limitless and is textbook but what benefits does it bring you, a programmer? Many things including redundant code reduction, re-usability and other textbook definitions like inheritance, etc.
  7. Comments
    It is a best practice to comment every 3 lines but please comment during every logical checks, breakpoints, iterations, etc. Also, follow all types of commenting – class level, method level, line level, etc.
  8. If you don’t get something right, don’t quit
    Be a competitor, Be a fighter and Be a winner.  If you have selected a logic/path to code a particular design, do not change unless you are sure there are no way out of that path to completion. Changing the logic often confuses the programmer of his initial objectives.
  9. Proper – meaningful error messages
    Do NOT log error which makes sense only to you. I have seen production code with funny errors (even seen Tamil word errors) and that’s definitely not funny. Always be professional. Either it be testing by self or a prod code, just be professional and log professional errors. And one more important thing – do not let an exception get out to customer UI. I mean, if I’m using a site which throws NullPointerException in the front end, I would close the browser right away.
  10. Test the code, at-least once
    Ah, this one is very very important. I hate people who don’t even test/run their program once to verify everything is okay. If you don’t even care about the correctness of the program, better don’t code anything. Be conscious about what you have written, understand the requirements, check for correctness in your code and finally, release the code only if you are satisfied.

Alright, that’s all I had in mind. These points are not exactly the perfect way to code but these are the ones, I, as a programmer felt that anyone, who claims to be a programmer should be made of.

Thanks for reading and hope you will be reading my next posts in the future!

Decided to write down what I feel like writing. Most likely, its stupid always. :D