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

Web service parameters

Former Member
0 Likes
1,891

Hi,

I would like to know your professional point of view about this thing:

I want to create a web service, which is based on FM. The FM should get an 'object' as import parameter. As a remote enable function, the FM can get parameters only by value.

What is the most common 'object' which I can use as a parameter.

(I thought about a table, which each line is a structure...)

Any suggestions?

Thanks,

Sivan

1 ACCEPTED SOLUTION
Read only

GrahamRobbo
SAP Mentor
SAP Mentor
0 Likes
1,643

Hi Sivan,

when I build web services based upon function modules I do a couple of things. These ideas are driven by the way the ABAP Web Service proxy generator builds the interface from the function module signature.

Firstly, I drop my usual ABAP naming conventions for the interface parameters so they read better in the web service interface. For example, instead of calling an exporting parameter EV_KUNNR I would call it CUSTOMER_NUMBER. The default name mapping would then product a name of PurchaseOrder CustomerNumber for the web service interface. This makes the WSDL easier to read and the interface more intuitive.

Secondly I only use IMPORTING and EXPORTING parameters. This is because CHANGING and TABLES parameters get defined on both the inbound and outbound sides of the web service interface. Again this makes the interface more complicated than it needs to be and any tools that introspect the WSDL will in turn generate much more complicated interfaces than necessary.

Cheers

Graham Robbo

Edited by: Julius Bussche on Sep 17, 2009 9:38 AM

Typo corrected.

Hi,

I would like to know your professional point of view about this thing:

I want to create a web service, which is based on FM. The FM should get an 'object' as import parameter. As a remote enable function, the FM can get parameters only by value.

What is the most common 'object' which I can use as a parameter.

(I thought about a table, which each line is a structure...)

Any suggestions?

Thanks,

Sivan

4 REPLIES 4
Read only

Former Member
0 Likes
1,643

Hi,

Please check the below SDN links on web services and how to consume the same from ABAP

;jsessionid=(J2EE3417400)ID1355318850DB10142222720013250947End?rid=/webcontent/uuid/83b7ec4d-0a01-0010-03a9-e5a3b42522b8

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30f1b585-0a01-0010-3d96-ad0ea291c...

Hope this helps

Regards

Shiva

Read only

GrahamRobbo
SAP Mentor
SAP Mentor
0 Likes
1,644

Hi Sivan,

when I build web services based upon function modules I do a couple of things. These ideas are driven by the way the ABAP Web Service proxy generator builds the interface from the function module signature.

Firstly, I drop my usual ABAP naming conventions for the interface parameters so they read better in the web service interface. For example, instead of calling an exporting parameter EV_KUNNR I would call it CUSTOMER_NUMBER. The default name mapping would then product a name of PurchaseOrder CustomerNumber for the web service interface. This makes the WSDL easier to read and the interface more intuitive.

Secondly I only use IMPORTING and EXPORTING parameters. This is because CHANGING and TABLES parameters get defined on both the inbound and outbound sides of the web service interface. Again this makes the interface more complicated than it needs to be and any tools that introspect the WSDL will in turn generate much more complicated interfaces than necessary.

Cheers

Graham Robbo

Edited by: Julius Bussche on Sep 17, 2009 9:38 AM

Typo corrected.

Read only

0 Likes
1,643

Hi,

Thanks for the good advice!

Do you think that working with tables as import\export parameter is a conventional way? Because I need to import\export a complex structure...

Thanks,

Sivan

Read only

0 Likes
1,643

Absolutely. Deep structures are also okay.

Cheers

Graham Robbo

p.s. Just reread what I wrote above. I meant to write "instead of calling an exporting parameter EV_KUNNR I would call it CUSTOMER_NUMBER. The default name mapping would then product a name of CustomerNumber for the web service interface."