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: 

WebService with parameters as values

aabida_majeed
Participant
0 Kudos
343

Hi Guys,

I want to create a sap web service and i want to execute this web service passing some parameters as values from outside (browser) i need to save these parameters that i send in a custom table, what is the best way to do this ? (any working examples would be great if any.)

Appreciate your suggestions on this.

Thanks

2 REPLIES 2

Former Member
0 Kudos
272

While programming your function module in SAP, define the tables that you want to pass as changing parameters. Then when you consume it, you can send the tables within the request.

Rodrigo-Giner
Active Contributor
0 Kudos
272

Hi Aabid,

To create the WS you have to follow this steps:

An example code of passing 2 parameters and saving them in a custom Table. (You can also pass directly a table instead of parameters)

IMPORTING PARAMETERES

username     TYPE UNAME

name           TYPE CHAR40

DATA: ls_zYour_Table TYPE zYourTable. " zYourTable has to be declared in SE11

ls_zYour_Table-username = username.

ls_zYour_Table-name       = name.

MODIFY zYourTable FROM ls_zYour_table.

Regards