cancel
Showing results for 
Search instead for 
Did you mean: 

Consuming Web service : Sample ABAP application

Former Member
0 Kudos

Hi Friends,

I am trying to consume existing web service. I have few questions.

--> Why do we need to create simple ABAP application while consuming Enterprise Service?

--> How this ABAP application will be triggered? Will it be triggered automatically or this is just for testing purpose?

--> After consuming Enterprise Service , which URL my end user can use to execute the functionality ( i.e to craete PO )

Waiting for your expert responses.

Thanks,

Rashmi Jain

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

Please see the responses below:

-->Why do we need to create simple ABAP application while consuming Enterprise Service?

When you created consumer proxy, you have a proxy class autogenerated. The ABAP program is to provide input data and instantiate and call the method within the proxy class.

--> How this ABAP application will be triggered? Will it be triggered automatically or this is just for testing purpose?

The program can be triggered using a Transaction or can be scheduled through batch or event based.

--> After consuming Enterprise Service , which URL my end user can use to execute the functionality ( i.e to craete PO )

The end user does not have to know the URL. This is built into WSDL from which you created consumer proxy.

Thanks,

Venu

Former Member
0 Kudos

Hi Venu,

Thanks a lot for your answer.

Still the flow is not clear in my mind.

Lets take an example , creation of purchase order.

What happens when user enters purchase order data on web screen. How it calls proxy , how our abap program.

It would be very nice if you could explain me flow.

Thanks a lot ( Again ).

Rashmi Jain

Former Member
0 Kudos

Hello,

I thought you are talking about consuming Web service from an ABAP program. If you are interested in internet Server programming, Application Server has Internet Communication Frame (ICF) work which can handle both inbound and outbound HTTP requests. In the ICF, you have Service Hierarchy (SICF) which houses the Services. In the services, you have classes and methods. In methods, BAPIs, Function Modules or SQL are embedded.

Please see the link for details:[http://help.sap.com/saphelp_nw70/helpdata/EN/36/020d3a0154b909e10000000a114084/frameset.htm]

Thanks,

Venu

Former Member
0 Kudos

Hi Venu,

Thanks a lot. Now I understand......

We need to create consumer application in ABAP or Java to consume web service. If we want it URL based we can create user interface in webdynpro ( ABAP or Java ). So now its clear.

Buuuuttttttt One more question.........

While creating logical port in consumer system we enter WSDL , user ID and password.

My question is while calling service ( using consumer application ) does it go to provider system or provider system is touched only once while creating Enterprise Service ( Proxy class ).

Just wanted to clear my basics...

Thanks a lot.

Rashmi Jain

Former Member
0 Kudos

Hello,

Whenever you make a service call, the request has to goto provider system. In the provider system, the underlying method or functionality will be executed. Based on type of service (synchronous or asynchronous), provider system will furnish reply to the request.

Thanks,

Venu

Former Member
0 Kudos

Ohhho....

Thanks a lot Venu.. My concepts are getting cleared now....

As you said, every time it connects to provider system.

In my case provider system is SAP ES marketplace. So what happens when SAP system is down?

I thought it will create functionality code in our system.

Then where actually data will be created ( e.g Purchase Order )?? , because functionality is written in provider system.

Lots of confusions and doubts Ufffffff!!!!!!!!

Thanks,

Rashmi

Former Member
0 Kudos

Hi Rashmi.

If you consume a web service during system downtime, you'll not receive any response from provider system, because it's a online consumption.

The data will be created at the provider system inmediattly you consume the service and the service itselfs returns no error.

Regards,

Darwin

Former Member
0 Kudos

Hi Darwin,

Then what is the use of web service if I can not create data in my system.

I am consuming a service from ES workplace and service is created in a system HU2. ( some SAP system )

My Purchase order will be created in HU2 then what is the use of service for me.

Thanks,

Rashmi

Former Member
0 Kudos

Hi Rashmi.

One of the reasons of web services is to make calls to remote or internal applications for business or program logic consumption.

I'll make an example of this:

You want to convert from Fahrenheit to Celsius. Instead of developing the functionality on your system you can consume the web service to make the conversion for you.

About the purchase order, it's created at the provider system, not in your developed system. You could list the created order consuming a web service that queries all the orders.

For query purchase orders at ES Workplace the WS is http://esworkplace.sap.com/socoview(bD1lbiZjPTAwMSZkPW1pbg==)/render.asp?packageid=DE0426DD9B0249F19...

Regards,

Darwin

Former Member
0 Kudos

Hello,

If you want to create Purchase Order in your own system, it is better to use ME21N or BAPI_PO_CREATE1.

Web services are meant for Application-to-Application or Business-to-Business scenarios. If you are calling a synchronous web service, the target system should be live and otherwise you will get error. However, you are calling Asynchronous web service, target need not be up and running at the same time. But for asynchronous call, you need a mediator like PI system to route the message in correct order when the target system comes back later.

Thanks,

Venu

Former Member
0 Kudos

Hi Venu,

Thanks a lot for your help.

I could consume a service in my system and it is working fine . For that I did the following:

--> Configured one system as Provider system.

--> Configured another system as consumer system.

--> Created logical port in consumer system.

--> Created consumer application n consumer system using web dynpro.

Now one more question to procees further.

We want to develop a business process using 4 services. This all we want to in ABAP.

How we can create a composite application in ABAP?

Foe Netweaver envoronment Java is required. Is this possible using ABAP?

Kindly help.

Thanks a lot.

Rashmi Jain

Former Member
0 Kudos

Hello,

This link [https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/7986] [original link is broken] [original link is broken] [original link is broken]; provides you with everything need: provide/consume service in ABAP, consume service using visual composer, web dynpro etc.

Thanks,

Venu