Skip to Content

You start a new MI Project. While starting you have to give the MDK Preferences pointing to your MI Home folder and Logon Id and Password.

Now, after coding, in order to see the Output of your code, you export your code and upload the Jar file in the WebConsole. Then you start your MI Client and download the application to your client after Synchronization. “IF” You make a very small change in your code and for seeing the result, you got to go through the SAME deployment process again and everytime… This is painful! Instead, I will guide you how to run your MI Code like you run any other the Java code from an IDE – “On the Fly”.

image

Create a new MI Application Run time configuration.

Set your Main Class to “com.sap.ip.me.core.Startup”.

image

Give your program arguments specifying the MI Home folder, trace settings and application type. Before you try this blog make sure all the settings are done and also, make sure, you have deployed your application at least once from WebConsole. This is to create a link in your “MI Client HomePage” so that we can use this link to run “enhanced” versions of our code from the NWDS itself. While executing the code from the NWDS, do not keep your MI Client running.

Now, make your changes in your code, Rebuild Project and FILE –&GT EXPORT your JAR file to the &LTmi home&GT\lib folder. It will get stored as &LTAPPLICATION_NAME&GT.JAR.

Note: When you upload a JAR file to Webconsole for the first time, and deploy it to your Client, it will get stored as &LTMobileComponentDescriptorName&GT&LTVersion Number&GT.JAR. The link in your MI Home Page points to this Jar file only.

So, rename the (latest) exported jar file to &LTMobileComponentDescriptorName&GT&LTVersion Number&GT.JAR (same name after first deployment). You may rename or delete the old one.

Tip: You may give System.out.println (SOPs) in your code to debug and trace your code flow.

Now, Execute the code using the Run Configuration. Your MI Client will pop up. Logon into your client and Click on the application link.

image

Bingo! Your New code will take effect.

When you exit your MI Client, your Console will get terminated and vice versa.

image

Note: All the while, your Console will be active showing your SOP’s and other information/exceptions. The numbers that I’ve circled in Red are my flow trace 🙂

WARNING:

Be careful when you fiddle with JAR file Names. A wrong name might confuse your MI Client totally. So, to be on a safer side, I would suggest you to take a copy of your LIB directory in your MI Client Home folder before you do this “on the fly” work.

SUMMARY

This blog is just to improve your Working Efficiency. You can easily trace your applications’ code and debug it from the entries in NetWeaver IDE Console itself. There will also be a trace file that will be developed by the MI Client in its own directory. You may view the trace in your Client using the appropriate sub menu.

Couple of Points for further Reference

You can have both AWT and JSP client running on the same computer. Generally this is not possible. But MDK provides a Work around for that. Visit the Online MDK Version through this link http://media.sdn.sap.com/public/html/submitted_docs/MI/MDK_2.5/content/gettingstarted/introduction/FAQ.html .

To Debug JSP runtime project in this fashion “On the Fly”, visit this link http://media.sdn.sap.com/public/html/submitted_docs/MI/MDK_2.5/content/eclipse/debuggingineclipse.html

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply