cancel
Showing results for 
Search instead for 
Did you mean: 

How determine credentials in 'webserviced' FM?

Former Member
0 Kudos

Hi,

As you all know it's easy to have all FMs (in our case in WebAS 6.2) webservice enabled.

I wonder however how I can determine in the FM what the ceredentials are one used when one calls the webserviced FM . Is the the SY var as is plain ABAP?

Eddy

Accepted Solutions (0)

Answers (1)

Answers (1)

athavanraja
Active Contributor
0 Kudos

All RFC enabled FMs are webservices.

You can get the WSDL of the webservice by using the below given URL.

http://<was_server>:<port>/sap/bc/soap/wsdl11?services=<RFC FM name in CAPS>&sap-client=<sap client>

Which will tell you about the parameters.

Yes SY var is plain ABAP.

Regards

Raja

eddy_declercq
Active Contributor
0 Kudos

Raja,

I think I've put my question not clear enough. All is already set. The FM is built (and of course the WSDL with it), the client is made. All I want to know is with which user the client calls the webservice.

Eddy

athavanraja
Active Contributor
0 Kudos

Hi,

it has to be a valid sap user.

log on credentials need to passed along with the SOAP request.

from where you are consuming the webservice?

Regards

Raja

eddy_declercq
Active Contributor
0 Kudos

That's for sure that it has to be a vaild SAP user, but in which variable is it put. Is it in sy-uname

like 'normal' ABAP coding or is it put in another variable special for webservices?

athavanraja
Active Contributor
0 Kudos

Yes its in SY-UNAME.

If you could tell me from where you are trying to consume this webservice (for e.g java client, vb client or mssoap client) it will be more clear to address the issue.

Regards

Raja

eddy_declercq
Active Contributor
0 Kudos

OK, thanx.

It was a PEAR:SOAP PHP client, but as suh it doesn't matter since we don't know what the consumer will be. We just want to know which user is using it in order to determine which data he can/will get returned.

athavanraja
Active Contributor
0 Kudos

Ok, in that case you can check sy-uname in the abap.

Regards

Raja