cancel
Showing results for 
Search instead for 
Did you mean: 

Submit Web Dynpro form to external URL

bdienes2
Participant
0 Kudos

Is there a way to submit a Web Dynpro form to an external url using the POST method?

I am able to use the onExit plug to pass a URL and submit query string parameters to the external url. My concern with this solution though is that the query string has length limits in different browsers (IE 2048 chars, etc.).

Any help/direction would be great.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

You can create a html page as a web resource and write an active script in it so that it submits itself.

I am not sure if it will work. But give it a try.

	StringBuffer sb = new StringBuffer();
	sb.append("<html>");
	sb.append("<head>");
	sb.append("<SCRIPT LANGUAGE="JavaScript">");
	sb.append("function submitForm(){");
	sb.append("document.form.submit();");
	sb.append("}");
	sb.append("</script>");
	sb.append("</head>");
	sb.append("<body onload="submitForm()">");
	sb.append("<form method=post action="Your_Active_Script" name="form">");
	/*
	 Similarly append body of the form
         Which might include hidden parameters
	 */
	sb.append("</form>");
	sb.append("</html>");
	IWDCachedWebResource webResource = WDWebResource.getWebResource(sb.toString().getBytes(),WDWebResourceType.HTML);
	try {
		wdComponentAPI.getWindowManager().createExternalWindow(webResource.getURL(),"Some Title",false).open();
	} catch (WDURLException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}

Regards

KK

Answers (1)

Answers (1)

thomas_szcs
Active Contributor
0 Kudos

Hi Brian,

Unfortunately, this is currently not supported.

Best regards,

Thomas

bdienes2
Participant
0 Kudos

What does not supported mean? Not possible, or no easy way that SAP provides?

Can you elaborate.

thomas_szcs
Active Contributor
0 Kudos

Hi Brian,

It just means that the feature is currently not available. My advise would be to contact SAP using the known channels in case you would like to ask for an implementation of this feature.

Best regards,

Thomas