cancel
Showing results for 
Search instead for 
Did you mean: 

Pass Structure to Webservice based on a Function module

darren_bambrick2
Active Participant
0 Kudos

Hi Everyone

I have created a webservice based on a functioin module, I have tested it and the webservice is up and running correctly.

I have an importing attribute called is_input that is based on a dictionary structure and has a number of fields.

I have created a form in transaction sfp and I have created a data connection to the WSDL file.

I have dragged the webservice button onto the form and tested the call to the webservice and it works.

I created a new button where I will manually call the webservice but I need to populate the request structure with some data.

Now my problem.

The form has a number of fields that I need to pass to the webservice function module, e.g. is_input-account

I need to populate the importing structure "IS_INPUT".

Does anyone know how to do this ? I tried variations on the code below but nothing seems to work.

var request = {"urn:sap-com:document:sap:soap:functions:mc-style:ZAgriCustVisitMaintain" : {IsInput.Account: "Test"}};

Any help would be great.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

chintan_virani
Active Contributor
0 Kudos

Dareen,

If you created the data connection for the WSDL and have dragged the fields from the Data view a binding is automatically created and you do not need to do any special coding for it.

Additionally if you have not dragged the parameter from data view, instead created the for UI say TextField1, etc then you need to bind this textfield to the paramter called is_input-account then goto Binding tab and do that manually.

Chintan

darren_bambrick2
Active Participant
0 Kudos

Hi Chintan,

Thanks for getting back to me. I have triied this approach and it works.