cancel
Showing results for 
Search instead for 
Did you mean: 

Call external URL from ABAP userexit, capture data and return it to SAP?

former_member202002
Active Participant
0 Kudos

My apologies if this question has been asked before, but I've searched for a few hours today and haven't found anything directly related to my question. Thank you in advance for any help you may be able to provide!

I would like to be able to make a call from an SAP userexit during Sales Order Entry in the VA01 transaction in the SD module to an external website, allow the user to capture some data in the external site and then pass that data back into the userexit where I can use it to populate internal tables, etc.

I'm completely unfamiliar with Web Dynpro programming, but this seems like a good place to start my search for a solution.

Does this sound like a problem that can be solved with Web Dynpro and what documentation or code examples should I reference to go about building such a solution.

I should also note that I'm hoping to build a solution that could be called from any userexit in R/3, SAP ERP, SAP CRM, etc. and would obviously need to learn about what dependencies to consider (ex: SAP GUI version, SAP product release number, Web AS release, etc.).

Eric

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Eric,

Did you find the solution to your question?

If yes, please share.

Best Regards,

Rupali

abdulbasit
Active Contributor
0 Kudos

CL_HTTP_CLIENT or Function Module HTTP_GET can be used here.

You can find many examples for these objects on SCN.

Former Member
0 Kudos

Hello everyone

How to upload currency Exchange Rates through (WWW.XE.COM ) in to SAP Table and its should update data within 30 min.

is this requirement feasible if how can i do this kindly help me

0 Kudos

Hi Dheeraj,

Could you please let me know if you have resolved your question or not?

I have exactly the same requirement.

Regards,

Muhammad Asad Qureshi

Former Member
0 Kudos

Hi Eric,

It will not be a straight solution , It can be completed in others way too but what i feel this might be useful,

You can call the webpage using the GUI_RUN FM and give the URL of that HTML page :

[Call External window |http://sapignite.com/trying-your-hands-with-exe-file-sap-abap/]

Now.Data will be there in that webpage, Now when user clicks on the submit / save button in that webpage

you want that data back.

To make it simple , You can create a RFC function module in your SAP System and call that FM from the

Webpage with respective data which you want to get back to your SAP .

Thanks & Regards,

~Raj

PatrickDean
Participant
0 Kudos

Thomas Jung for the win... as usual.

This assumes that the web response is intelligible. You can use this to read weather reports, news feeds, and for validating ZipCodes/PostCodes. (i.e. you feed a postcode to the Google Maps webservice, and if it can turn it into a LatLng, then you know it's a legit postcode).

Weather feeds might be useful if you were on ISOil and wanted to attach to your Oil Tanker manifests.

ExchangeRate feeds could be used to update your Currency conversions.

News feed, who knows, someone could find a use.

Former Member
0 Kudos

I think your problem has nothing to do with web dynpro as you are in user exit of SD transaction. I think what you have to do is, create a BAPI and give a call in your user exit and pass the data to the bapi as per ur requirement and get the data back. You have to provide the information about your target server.

Now here question raised, Is your external system is also SAP and it's in your company 's landscap, then you have to transport your bapi to that server before giving a call.

If target system is Non-sap system then probably you need to look for ALE or XI solution.

Thanks,

former_member202002
Active Participant
0 Kudos

Thank you for the response. Let me provide some additional information.

The external application will be a Hosted Web page. It is not an SAP system.

The external application will be a web page served by a separate system outside of the company domain(shouldn't matter what the technology is I would think - but the web page will be hosted by a different company than the one calling the URL) that would appear as a web page in which the user will enter data, logic will be performed on that data and then some or all of the data would need to be passed back to the calling point in SAP.

For practical discussions it doesn't matter to me if the call in ABAP occurs in an SD userexit, in a custom report, in an HR screen or in a CRM business partner screen. There will be many places where this external application may be called from and I'm just trying to figure out how to call an external HTTPS URL and return data from that web page to the calling point in ABAP.

I hope that clarifies my question.

Thanks!

Eric

Former Member
0 Kudos

You dont need to call https'/url's, infact you have to find out which technology they are using like .net/ java etc.. and then you need to use XI or ALE to establish the link. That is my suggestion. May be there is some other way also. But as per my knowledge you can proceed like this.

Thanks,

former_member202002
Active Participant
0 Kudos

The external application will be a web page hosted by a separate company and I can't guarantee that XI/PI will be available for use.

It would almost be something similar to calling Google from SAP, performing a search and returning the search results to SAP to be used in the ABAP program which called the external web page.