Quantcast
Channel: SCN : Document List - SAP Manufacturing Integration and Intelligence (SAP MII)
Viewing all articles
Browse latest Browse all 87

How to debug a SAP MII Custom Action

$
0
0

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)

 

1.png

 

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


2.png



2.   Start the debug session in NWDS

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

3.png


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

4.png

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


5.png


Select “Start Debug Session...”


6.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:

 

7.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:

 

8.png

 

Press “Debug” button.

 

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

 

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

 

9.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:

 

10.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:

11.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:

12.png

 

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


13.png


I hope it helps you.


Viewing all articles
Browse latest Browse all 87

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>