cancel
Showing results for 
Search instead for 
Did you mean: 

IRPT page submiting a form to a Servlet or something like this.

Former Member
0 Kudos

Hi masters.

I have to avoid javascripts on my development, so I need to delegate everything from the IRPT pages to the server side. Thinking about java servlets, I would like to know if SAP MII 12.X has something like java servlets, I read about Custom Actions but it is not a servlet, so I can not submit anothing to this.

Is there any way to create something in MII and use it in IRPT pages, like <form method="post" action="?????">  ?

Can I use a MII transaction like a servlet, to submit a form, process it and return another IRPT page ? Or is there another way ?

Accepted Solutions (1)

Accepted Solutions (1)

jcgood25
Active Contributor
0 Kudos

The action in your html form can easily be an irpt, where the native behavior of the form puts all of the name/value pair elements (hidden fields, option/selects, input boxes, etc) at the end of the url.

The same can be done for using /XMII/Illuminator, /XMII/ChartServlet or any of the other relevant services you find in the help as your form action.  All of the name value pairs go after the ? and will impact the request accordingly. 

The use case combinations of SERVLET calls embedded in an IRPT page (server side rendering of html content, etc) and html forms can allow you to make mobile friendly pages quite easily.  XSL files effectively become your display template when running a query template - turning the Rowset/Rowset/Row data from your xml results into an html table or other output as desired.

Answers (3)

Answers (3)

Former Member
0 Kudos

Thank you people for all helpful answers.

Now I understand that if I use servlets I will have to create a new java projet outside of my MII project.

So, trying to maitain all the development in the MII Workspace I would like to understand what could I do with the Iluminator servlet using query templates and stylesheet, with this solution can I display a new HTML result with input fields and buttons ?

I already have a lot of xAcuteQuerys, but its results I get with ajax functions and show it in the IRPT pages using javascripts, it works well. But now I have to avoid javascript in this new project to Windows Mobile 5.0.

Former Member
0 Kudos

Why not use jsp pages within MII?

I'm not en expert in Java so I'm using most my knowledge from ASP.net but when the form is submitted the page and form values get sent server side to the 'code behind' for you to do processing with it.

This is just a simple JSP page but all that is returned to the browser is the hostname of the computer, everything between <% %> is java code that is run server side.

<%@ page contentType="text/html; charset=iso-8859-1" language="java"  %>

<%

          java.net.InetAddress thost = java.net.InetAddress.getByName(request.getRemoteHost());

          String HostName = thost.getCanonicalHostName();

%>

<%= HostName %>

Former Member
0 Kudos

Hi Michel,

Yes. That is possible.

The link below is a simple example:

http://help.sap.com/saphelp_xmii115/helpdata/en/Advanced_Topics/Customizing_Output/Customizing_Outpu...

Another example of sending data to another page.

Page1.irpt

<form id="frm_edit" name="frm_edit" method="post" action="Page2.irpt">

<input name="id_machi" type="text" id="id_machi" />

<input type="button" name="btn1" id="btn1" value="Send"/>

</form>

Page2.irpt

<SERVLET NAME="Illuminator">

<PARAM NAME="QueryTemplate" VALUE="SIS/query_templates/MII_SIS_MachineUserUpd">

<PARAM NAME="StyleSheet" VALUE="/XMII/CM/SIS/Themes/IllumTextOutput_Icommand.xsl">

<PARAM NAME="Content-Type" VALUE="text/xml">

<PARAM NAME="Param.1" VALUE="{id_machi}">

<PARAM NAME="Param.2" VALUE="{IllumLoginName}">

<PARAM NAME="Param.3" VALUE="D">

</SERVLET>

Hope this help.

Danilo Santos

Former Member
0 Kudos

please I need an answer so much

agentry_src
Active Contributor
0 Kudos

Hi Michel,

I suggest that you run this custom google search against MII and servlet.  Do not limit the timeframe since servlets have been around for a while and some very good work has been done over the last several years in a wide variety of uses and with a variety of presentation technologies. 

I have worked with servlets, but not in the last several years, so do the research and hopefully some more knowledgeable/experienced folks will chime in.

Regards, Mike