Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

send data by web service

Former Member
4,409

Hello Experts,
I am new in this subject, but I have a requirement to send some data as XML through Web service and to achieve this I have created as shown in the screenshot
1- Functions group
• Function module
2- Service provider
3- Service consumer
Now how can I send the data as HTML , I think the first thing that I want is

1- code to pick the required data up e.g all the materials in MARA , then

2- code to send them as HTML to a service provider to the service consumer in the other side.
Could some help me how to achieve this ??

Best regards

Jenie

13 REPLIES 13
Read only

Former Member
0 Kudos
2,242

pls any suggestion

Read only

matt
Active Contributor
2,242

Create a function module to extract the data. Then create a SOAP service from that function module. It's the simplest way to do it, especially for a newbie. See https://blogs.sap.com/2013/12/04/create-a-webservices-on-abap-from-a-function-module/

SOAP is a bit out of fashion now, though it does work. You could try a RESTful webservice. See https://blogs.sap.com/2013/09/16/creation-of-restful-webservice-in-sap/ This is class based.

Read only

Former Member
0 Kudos
2,242

many thanks for your reply , I will test it , and close the questions ( put is as answered).

Read only

Former Member
0 Kudos
2,242

ok , I have already followed all that has been mentioned in first option,and now I need as ( I think ? )

a program (or somehow ) to send this data to an external server,

Read only

ChrisSolomon
Active Contributor
0 Kudos
2,242

"a program (or somehow ) to send this data to an external server,"

So you are wanting a "push service" rather than some external requester calling your web service to "pull" the information? Is this correct?

Read only

Former Member
0 Kudos
2,242

Dear Christopher,
honestly, I don't know the difference between the two options that you have mentioned, could you please give me more info about the difference between them !
All what can say is the client has no SAP system ( Portal ) to receive and save the data from many companies, I don't know exactly what is the role of the client in this process. I mean should he provides me with an URL so that the data would be sent sent ? or ......
sorry but I am really confused .....

your advice will be highly appreciated

Read only

Tomas_Buryanek
Product and Topic Expert
Product and Topic Expert
0 Kudos
2,242

It seems you first need to communicate what to do with corresponding people. And then think about how to do it.

-- Tomas --
Read only

matt
Active Contributor
2,242

Is the transfer of data triggered from SAP or is it triggered from the 3rd party system.

Does a user on SAP say "send the data to the other system now".

Does a user on the other system say "SAP - send me the data".

Read only

Former Member
2,242

Dear Tomas,
it is not so complicated. I want just to push the data to a client, who is supposed to be like data saver.
this is all the thing,

Best Regards

Read only

Former Member
0 Kudos
2,242

Dear Matthew,
Many thanks for your reply, please find below my answers :

  1. Is the transfer of data triggered from SAP or is it triggered from the 3rd party system.

The data would be from SAP transferred so she should be by SAP triggered too.

2. Does a user on SAP say "send the data to the other system now".

I am the user in SAP, I don't understand exactly what you mean with 'say', is this something systematic or a requirement.
if I have correctly understood ! , you mean who will say 'now the data will be transferred' or who decide to start the process.
if it so. I will send the data monthly on an agreed date to the other user and he or she has nothing to say.

3.Does a user on the other system say "SAP - send me the data".

This questions is already answered

Please inform me if you need more information ,

Best Regards

Jenie


Read only

matt
Active Contributor
2,242

Then the data is pushed from SAP to the third party. That means the third party system must provide the webservice, and it will be called from SAP. In technical terms, SAP consumes the 3rd party webservice.

There are blogs about consuming both SOAP and RESTful 3rd party web services.

Read only

Former Member
0 Kudos
2,242

thank you for your reply , then what is my role as service provider , most of the examples are talking about how to call the data from the ‘http://api.worldweatheronline.com/free/v2/weather.ashx‘.

Read only

matt
Active Contributor
0 Kudos
2,242

The third party system has to provide you with the relevant information for you to connect to it. Either a WSDL if it is SOAP, or the details of how its RESTful service works.