Skip to Content
Author's profile photo Former Member

How to debug a SAP MII Custom Action

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)

/wp-content/uploads/2014/10/1_575679.png

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


/wp-content/uploads/2014/10/2_575680.png



2.   Start the debug session in NWDS

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

/wp-content/uploads/2014/10/3_575685.png


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

/wp-content/uploads/2014/10/4_575686.png

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


/wp-content/uploads/2014/10/5_575688.png


Select “Start Debug Session…”


/wp-content/uploads/2014/10/6_575689.png


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:

/wp-content/uploads/2014/10/7_575690.png

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:

/wp-content/uploads/2014/10/8_575691.png

Press “Debug” button.

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

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

/wp-content/uploads/2014/10/9_575692.png


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:

/wp-content/uploads/2014/10/10_575693.png

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:

/wp-content/uploads/2014/10/11_575694.png

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:

/wp-content/uploads/2014/10/12_575697.png

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


/wp-content/uploads/2014/10/13_575699.png


I hope it helps you.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.