3 Replies Latest reply: Aug 23, 2012 11:54 PM by Jesus Adolfo Valencia Perez RSS

I need to call an external Web Application sending HTTP Post parameters.

Jesus Adolfo Valencia Perez
Currently Being Moderated

Hello experts,

 

We have a WebDynpro ABAP application, that needs to call another web application (.NET based).

 

The application that receives the parameters, receives them via POST, this is because the amount of data passed can be quite big sometimes. So using GET isn't an option here due to the URL string limitations.

 

I have been looking around but haven't find anything specific, so here I am asking "How can I pass parameters via POST from WebDynpro ABAP to an external Non-SAP web application".

 

I have been looking around the method CREATE_EXTERNAL_WINDOW from the IF_WD_WINDOW_MANAGER interface, I see there is a boolean parameter called USE_POST, but I can't find examples or good documentation about this parameter, also, I can't see any other parameter where I can pass the POST values per se.

 

Any comments will be appreciated.

 

Thanks in advance.

 

JV

  • Re: I need to call an external Web Application sending HTTP Post parameters.
    Chengalarayulu D
    Currently Being Moderated

    JV,

     

    as per my analysis, large data with post is critical in some situations. if it is possible to call any web-service / RFC from .NET interface initially, then it will be the same i guess. just work around this, this will work out.

    • Re: I need to call an external Web Application sending HTTP Post parameters.
      Sarika Kumari
      Currently Being Moderated

      Hi Jv,

       

      how you are opening the external window using 'Link to action' or 'Link to url' ui? can you please tell me the complete requirement

       

       

      ---S

      • Re: I need to call an external Web Application sending HTTP Post parameters.
        Jesus Adolfo Valencia Perez
        Currently Being Moderated

        Hello Chengalarayulu & Sarika.


        Thank you for your answers. I got my problem resolved by my way. And here is how I got to solve it for the record.


        In perspective of what Chengalarayulu said, it wasn't an option for us. We needed to pass data from WebDynpro to an .NET application, the application needed to be opened in a new window, because the process that is to be continued from .NET does not have to return anything to WebDynpro, and neither we wanted to exit the current WebDynpro application. Having the .NET application "asking" the data to SAP via RFC or WS didn't seem like a good approach, even more, when what you are supossed to do is a very simple task. And in the end, it kinda is.


        The issue was solved like this:


        The original WebDynpro applicartion embeded in the portal, opens another WebDynpro in an external window as stand alone, this second WD Application is faceless, it just gets the data it needs to be passed via POST. Then using a local variable with type TIHTTPNVP that is a Name / Value pair table type for HTTP. Once the table was filled with all the data, you just need to fire an Exit plug for this application, and add a variable to the Exit plug, in my case I named it POST_PARAMS with type TIHTTPNVP, and add the local variable with the data to the Exit plug as a method parameter. So the exit plug navigates to the exit URL, and pass the parameters via POST. Since this second faceless WebDynpro application is running in an External Window and in standalone mode, is valid to use the Exit plug, other wise disabled when your app is embeded in the Portal.


        And this is the way you can send information via POST to another SAP or Non SAP WebApplication. To be sure the data was passed via POST I just did a simple HTTPWATCH test and I could see when calling the .NET application, all the parameters were being sent through POST. I find the solution I implemented "somehow", "the way I wanted to be", and not a workaround (somehow, bacause I had to do an extra WD App, a little one, but still counts).


        I hope this explanation helps anyone with a similar situation/requirement.


        Anyway, thanks for your answers. I should reward points to myself, but I can't, so I'm gonna drink a beer instead.


        Cheers!

Actions