cancel
Showing results for 
Search instead for 
Did you mean: 

AJAX Call to BSP -> avoid intermediary "Your request is being processed"

Former Member
0 Kudos

Hello,

I'm performing an AJAX call to a BSP page (using the jQuer load() function).

Unfortunatelty I'm getting a intermediary response which contains the message "Your request is being processed".

This is the complete HTML source of this response:


<h t m l>
<h e a d>
   <s t y l e type="text/css">.middle  { vertical-align:middle; }</style>
</h e a d>
<b o d y    o n l o a d="document.forms[0].submit()">
   <form method="post" action="/sap(bD1lbiZjPTAyMA==)/bc/bsp/sap/zzv5_my_orders/selected_orders.htm">
      <input type="hidden" name="partner" value="229440">
      <input type="hidden" name="shipto" value="ALL">
      <input type="hidden" name="arktx" value="*">
      <input type="hidden" name="bstnk" value="*">
      <input type="hidden" name="inco1" value="ALL">
      <input type="hidden" name="ettype" value="A">
      <input type="hidden" name="nbdays" value="14">
      <input type="hidden" name="status" value="*">
      <input type="hidden" name="nblines" value="50">
      <input type="hidden" name="langu" value="EN">
   </form><table border="0" width="100%" height="100%">
   <tr><td align="center" class="middle">Your request is being processed</td></tr></table>
</body>
</html>

(I've added some black in tags in order to avoid SDN proxy problems)

The form contains all parameters I have initialy passed through the AJAX call, is is automaticaly submited in the onload() event.

But It is totaly messing up my AJAX call!

This behavious doesn't seem to depend on the content of the BSP page: I'm getting the same result with an empty BSP.

The BSP does not contain <xhtmlb:protectDoubleSubmit>.

How can I avoid this intermediary response?

Many thanks for your help, experts!

Jerome.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Solved: this behaviour only occurs when a HTTP POST is made.

I've replaced it by a AJAX GET request.

Jerome.

Former Member
0 Kudos

Hello,

I got the same case. Changing method to GET solves the problem. However, the source of the problem is not the method actually. You get this error where you don't actually post any data.  There are cases where I use POST method and get no error.

If you send data in data parameter of ajax request and use post method you will not get error. I think, if you send empty json string in data parameter you will not get the error.

varemptyRequest = {};

$.ajax({

     url:    postingUrl,

     data : emptyRequest,

     dataType: "json",

     method : "POST",

     success: function(result) {

            processresult(result);



          });

Message was edited by: Umit Coskun Aydinoglu

Former Member
0 Kudos

Hello,

I found the reason. If you give relative path of the url that will be called by ajax, you don't  get any error either in POST or GET method. I don't know why BSP behaves in that way.