Skip to Content
Author's profile photo Prabaharan Asokan

Troubleshooting SAP Netweaver gateway and SAP ECC systems from HTML5 webapp

Dear All,

This blog is about debugging Netweaver gateway and SAP ECC system during a server request made from a HTML5 web app.

Pre-requisite: We create a Function module that is remote enabled in ECC.

Add the authorization header in the AJAX call for the user we need. To find the authorization value for the users we can make use of REST clients such as POSTMAN etc or Gateway client tool.

Authorization header.png


     type: “DELETE”,

     processData: false,

     contentType: “application/json”,

     processData: false,

     data: ”,

     dataType: “text”,

     headers: {

         “x-csrf-token”: token1,

         “Authorization”: “Basic ZjaDM=”


     url: delete_path,

     success: function (resp) {

         error: function (resp) {

             alert(“unable to delete file”);



Add an external breakpoint for the desired user in gateway system.(may be a redefined method or a remote FM )


Add an endless loop to code snippet in ECC system in your custom FM or a class as follows.



    IF W_VAR < 5.



    W_VAR = W_VAR + 1.


Now when run the application from browser we will see the ABAP debugger session will be opened in gateway server.  If we had an RFC call to backend

to fetch then we can notice an endlees loop running in ECC.

Goto transaction SM50, click on as shown below .


Once debugger opened please click on variable W_VAR and change the value to 4 dynamically. You will see the loop gets exited giving room to troubleshoot next set of code.

We are now successfully able to debug the systems and made sure the code is bug free.

There may be other methods/tricks to accomplish this tasks much easier than this.

I welcome feedback/concerns to improve the content.



Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.