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

Problem in Webservice

jitendra_it
Active Contributor
0 Likes
897

Hi Gurus,

We are creating a webservice in ABAP using FM, which have multiple EXPORT parameters.

when java people consume it, it is showing all the paramerter as input parameters in java and return type of method(FM) is VOID.

Can't we create a FM in ABAP which have multiple export parameters and publish it as webservice??

Please help.

Thanks

Jitendra soni

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
856

Hello Jitendra soni,

Each IDE has different way of generating the Proxy. Eventhoug it appears as input parameter in the java side. You don't need to pass the value ti it during the webservice call. All the values will be populated by SAP during the webservice call and you need to take the value back from that field after the successfull completion of your webservice call.

For some IDE's due to the restriction you may need to intialize the values for some return parameters including the BAPI return parameters.

In the SAP side we need to clear all the values that are comming from the java interface call in the very first line of the FM code safer side( for all the Export and result tables parameters values).

Hope this answers your question.

Thanks,

Greetson

6 REPLIES 6
Read only

Former Member
0 Likes
856

Hi Gurus,

>

> We are creating a webservice in ABAP using FM, which have multiple EXPORT parameters.

>

> when java people consume it, it is showing all the paramerter as input parameters in java and return type of method(FM) is VOID.

>

> Can't we create a FM in ABAP which have multiple export parameters and publish it as webservice??

>

> Please help.

>

>

> Thanks

> Jitendra soni

Hi Jitendra,

Can you check if you've followed the steps in

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d09cee55-2bba-2c10-e89b-d9a74f8c4...

Regards,

Ajay

Read only

0 Likes
856

hi ,

yes, i have done that..

Read only

Former Member
0 Likes
857

Hello Jitendra soni,

Each IDE has different way of generating the Proxy. Eventhoug it appears as input parameter in the java side. You don't need to pass the value ti it during the webservice call. All the values will be populated by SAP during the webservice call and you need to take the value back from that field after the successfull completion of your webservice call.

For some IDE's due to the restriction you may need to intialize the values for some return parameters including the BAPI return parameters.

In the SAP side we need to clear all the values that are comming from the java interface call in the very first line of the FM code safer side( for all the Export and result tables parameters values).

Hope this answers your question.

Thanks,

Greetson

Read only

0 Likes
856

Hi Greetson ,

Thanks a lot . it solved my problem.

I have one more query , Can we use Changing/Tables parameters of FM in webservices ??

Thanks

Jitendra Soni

Read only

0 Likes
856

Yes. You can use both Changing as well as tables. During the proxy generation corresponding classes will get generated and you need to pass the array of the class that got generated to the Webservice call for the tables .

Thanks,

Greetson

Read only

Former Member
0 Likes
856

I totally agree with Greetson.

You can also create a ZFM which is remote enabled and publish it as a web service using ABAP.

Thanks.