cancel
Showing results for 
Search instead for 
Did you mean: 

abap application invoking external webservice (with/without PI)

former_member188019
Active Participant
0 Kudos

Hi,

an SAP ECC application wants to invoke a webservice available on internet e.g curryency converoor webservice available on http://www.webservicex.net/CurrencyConvertor.asmx?wsdl

in this case,

can we write an abap application in ECC to directly invoke the webserivce (ECC -> externalWebservice), or

is it required to use PI to invoke the external webservice. (ECC -> PI -> externalWebservice)

are both are possible?, which one is recommended.

thanks,

Madhu.

Accepted Solutions (1)

Accepted Solutions (1)

prateek
Active Contributor
0 Kudos

Both are very much possible.

Use PI if you want to enhance the monitoring capabilities and accumulating monitoring at a central location. PI will also let you add certian mappings if required.

Don't use PI if you think that this ABAP report would be the only communication to that webservice in future. Otherwise for some next call to the same webservice you would require another report. Therefore when reuse is not required, you may avoid PI.

Regards,

Prateek

Answers (3)

Answers (3)

former_member183908
Active Contributor
0 Kudos

Hi Madhu,

---> We can go for both options which we have one is with out PI (Point to Point webservice) an the other option is with PI (Brokered Webservice).

-->Download the WSDL file from the respective location and save it on your local system.

-->To consume the webservice create the Client Proxy in SE80,select Enterprise Services while creating import the WSDL file into it and create the program and write the required logic.

it depends on your requirement whether you want to go for with PI or with out PI.If you want change the incoming source structure (Mapping Transformation) into required format of the target structure then we must and should go for Brokered Webservice other wise it will be better to go for POINT TO POINT Webservice

Thanks

former_member188019
Active Participant
0 Kudos

thanks for your inputs.

i think we go for PI, as we can use the sxmb_moni to watch/debug/monitor the payload exchanged between the webservice provider and the SAP ECC application.

former_member181962
Active Contributor
0 Kudos

Hi Madhu,

Here is one way of consuming a webservice using ABAP (Without using PI)

http://sample-code-abap.blogspot.com/2009/05/simple-code-consume-web-service-using.html

Regards,

Ravi

turmoll
Active Contributor
0 Kudos

Both options are possible ...

Use PI if you need to do e.g. mapping between different message structures. If mapping is not necessary the you can call directly.

What you need to do to consume webservice directly is to create service (SE80 -> create proxy object -> URL /HTTP Destination)

/Jakub

PS. check this nice weblog: [BSP a Developer's Journal Part XIV - Consuming WebServices with ABAP|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1012] [original link is broken] [original link is broken] [original link is broken];.