Application Development 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: 

Make function webservice enable

Former Member
0 Kudos

Hi,

I have a function module (see below).

I want to make my function module work like a webservice!

Any pointers ?

MyCall: www.myserver.com?p_vkorg=4000

and then receive the resultset as xml.

Eg: <ZWEB_MAT>

<MATNR>100757</MATNR>

<MATNR>100758</MATNR>

</ZWEB_MAT>

Code:

Local interface:

*" IMPORTING

*" VALUE(P_VKORG) LIKE MVKE-VKORG

*" TABLES

*" I_MATERIAL STRUCTURE ZWEB_MAT

//Martin

7 REPLIES 7

athavanraja
Active Contributor
0 Kudos

Make it Remote enabled and if you are on WAS6.2 and above then you can expose the same as webservice.

For WSDL generation have a look at <u><b>webservicebrowser</b></u> BSP application.

For more look at Thomas Jung's Weblogs.

Regards

Raja

0 Kudos

With 6.4 you've the web service creation wizard in se37 also.

0 Kudos

Hi,

How do I TEST my webservice (Z_WEB_GET_STOCK)... is there a tool for this ?

(WAS620)

IMPORTING

P_MATNR array of chars (18) Material Number

P_WERKS array of chars (4) Plant

EXPORTING

CHANGING

I_STOCK structure - Stock list

EXCEPTIONS

0 Kudos

There a lot of options. At the SAP side there is first of all the SOAP client tool https://www.sdn.sap.com/sdn/downloaditem.sdn?res=/html/soapclient_download.htm

You can opt for writing your own client in ABAP. See the weblogs /people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap and /people/durairaj.athavanraja/blog/2004/09/20/consuming-web-service-from-abap

Other language like Java, Perl, PHP can be used too. An example on SOAP::Lite can be seen at the weblog /people/piers.harding/blog/2004/06/16/lather-up-with-soaplite-and-the-web-application-server

If you don't wanna code anything, you can have a look at Altova XML Spy (http://www.altova.com/features_webservices.html), which also integrates with eclipse.

0 Kudos

Hi,

OK. I really do not want to use SOAP in this case I have here....

I just wanna be able to call my WS like this:

www.mycompan.com/rfc/z_web_get_stock?p_matnr=123&p_werks=3100

and then receive it in xml.

The browser (For testing) should be able to do this ?!

//MA

0 Kudos

Pointing to the URL with a browser will do indeed if you only want to see what XML your WS produces. The webservice browser Durairaj Athavan Raja mentioned will do also.

eddy_declercq
Active Contributor
0 Kudos

Pls don't forget to give reward points if you're pleased with the answers given.