2018 Aug 20 3:39 PM
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
2018 Aug 22 9:28 AM
2018 Aug 22 9:37 AM
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.
2018 Aug 22 4:21 PM
many thanks for your reply , I will test it , and close the questions ( put is as answered).
2018 Aug 22 4:29 PM
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,
2018 Aug 22 6:52 PM
"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?
2018 Aug 22 10:19 PM
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
2018 Aug 23 7:47 AM
It seems you first need to communicate what to do with corresponding people. And then think about how to do it.
2018 Aug 23 8:18 AM
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".
2018 Aug 23 8:38 AM
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
2018 Aug 23 8:52 AM
Dear Matthew,
Many thanks for your reply, please find below my answers :
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
2018 Aug 23 10:52 AM
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.
2018 Aug 23 1:37 PM
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‘.
2018 Aug 23 3:13 PM
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.