Product Lifecycle Management Blogs by Members
Get insider knowledge about product lifecycle management software from SAP. Tap into insights and real-world experiences with community member blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

How to debug a SAP MII Custom Action

This document was made based on the following softwares and versions:

Server side:

  • SAP MII 14.0 SP5 Patch 13
  • SAP Netweaver 7.31 (VM Java Version: 1.6.0_65, VM Runtime Version: 6.1.058 24.45-b08, Kernel Version: 7.31.3301.349564.20130627115115)

Client side:

  • SAP NetWeaver Developer Studio ( SAP Enhancement Package 1 for SAP NetWeaver Developer Studio 7.3 SP05 PAT0000 )

Follow these steps if you have MII Custom Actions and you need to debug its execution on server side:

1.   Configure SAP AS Java in NWDS

NWDS -> Menu -> Window -> Preferences -> SAP AS Java -> Add -> (Fill out those fieds with your MII server host ans instance number, like the figure bellow)

After that, press OK button, the server will be shown in the table:




2.   Start the debug session in NWDS

NWDS -> Menu -> Open Perspective -> Other (select SAP Management Console, like bellow)


In the left view, select your server instance and open the tree menu until find the “Process Table”.

In the center view, click with the right button in the server item to see its menu options.



Select “Start Debug Session...”



Leave the “Code Isolation” checkbox selected and press “Next” button, and after that, “Finish” button.

If the system asks you a password, use “<system>adm” user and password, in my case the user is “miqadm”, your basis team should have this password.

Wait about 1 minute and see still in the content view, the “Debug“ column, to know your debug port, like that:

My debug port is “50021”

3.   Create the debug configurations

NWDS -> Menu -> Run -> Debug Configurations.

Select “Remote Java Application” click in the button     (New launch configuration) and fill out the fields like I did:

Press “Debug” button.

NWDS -> Menu -> Window -> Open Perspective -> Other -> Debug

If everything worked, you will see the debug view like that:


4.   Create the break point in your custom Action and execute it


In your custom action java class, put a break point where you want to debug:

You need to identify your internet explorer (or your prefered browser) session as a debug session, to do it you will need to open a new internet explorer tab (in the same window that you are using MII workbench) and put there your debug url, something like this:

https://srvsqmii01:50001/@@@DEBUG@@@-20845202/

To get your debug session url, come back to SAP Management Console perspective, and do like I did:

Now, you just need to execute the MII Transaction that have your custom action, and NWDS will catch up the execution and let you to debug it.


Example of my debug session in execution:

My NWDS has catched up that execution in its debug session and now it is like this:



I hope it helps you.