Hello, experts.
I faced a weird problem. Inside of CL_GUI_HTML_VIEWER I use the following JavaScript code to raise POST SAPEVENT:
var form = document.createElement("form"); form.setAttribute("method", "post"); form.setAttribute("action", "sapevent:foobar"); var field = document.createElement("input"); field.setAttribute("name", "foo"); field.setAttribute("value", "bar"); form.appendChild(field); document.body.appendChild(form); form.submit();
In SAP GUI for Windows this works fine. But when I use SAP GUI for Java both POSTDATA and QUERY_TABLE are empty. What could be the problem? And how can it be solved?
UPDATE:
It seems to be some security issue. Once form's action is changed with JavaScript, the form fields are no longer sent to the backend wit SAPEVENT. This happens only in SAP GUI for Java. In SAP GUI for Windows everything works fine. Any ideas how to fix it?