cancel
Showing results for 
Search instead for 
Did you mean: 

webrfc is not working

Former Member
0 Kudos

Hi persona gurus,

right now we are using SAP PERSONA's version 1.0 with sp04.

when i tried in the system to create WEBRFC and  follow the same steps suggested in the below blog  call the function module as mentioned in the below Blog.I've checked the function module in SMW0 and found that it is released to internet.

i am getting below Error:

Parameter _FUNCTION is missing or written incorrectly in www_DISPATCH_REQUEST.

do i miss any other steps to get this Done.

Please suggest!!

Thanks in Advance.

Regards,

Sudarsan.S

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Gurus,

Thanks for Helping me.

when i followed your suggestions, here i am getting the below Error.

Please help me in avoiding this.

sudarsan.S

Former Member
0 Kudos

Have you tried running the function in test mode in SE37? Does it work correctly there? Does the short dump give any clues about the problem?

I have copied your function into my system and it works as expected directly in the browser:

Former Member
0 Kudos

Hi Steve,

Thanks for helping me in solving this as this is working.

Instead of name as sudarsan when i started passing _Name = {fieldvalue}.

It started working ..

Sudarsan.S

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Steve,

First of all Sorry for Delay and thanks for Response.

I copied the same code and created the function module(remote) which i've seen in the blog :Calling RFCs from a Personas script

and followed the same steps mentioned in the blog for releasing the function module to internet.

But the same error appearing .

Sudarsan

Former Member
0 Kudos

To repeat a question from my first response, can you call the WebRFC directly in the browser? If there's a problem with the basic webRFC mechanism, Personas errors don't always help much in figuring out that problem. Calling the webRFC directly, by pasting the URL into the browser, makes it easier to see what's going on. Once that works, getting Personas to make the same call should be easy.


Steve.

Former Member
0 Kudos

Hi steve,

i tried even to pass the url(with combination of server,port,bc/sap/webrfc,_function,name eq "function name) in the browser. But it is throwing the Error

Parameter _FUNCTION is missing or written incorrectly in www_DISPATCH_REQUEST.

do i miss any other steps to get this Done.

Please suggest!!

Sudarsan.S

Former Member
0 Kudos

If you included the full URL you gave to the browser it would be easier to help you.

Steve.

Former Member
0 Kudos

Hi Steve,

Sorry for Delay.

please check the below url.

http://hllsap137(servername):8000(portname)/sap/bc/webrfc?sap-client=300_FUNCTION=Z_WEBRFC_QM01

I am attatching the function module code for your reference.

*"----------------------------------------------------------------------

*"*"Local Interface:

*"  TABLES

*"      QUERY_STRING STRUCTURE  W3QUERY OPTIONAL

*"      HTML STRUCTURE  W3HTML OPTIONAL

*"      MIME STRUCTURE  W3MIME

*"  CHANGING

*"     VALUE(CONTENT_TYPE) LIKE  W3PARAM-CONT_TYPE DEFAULT

*"       'application/json'

*"     VALUE(CONTENET_LENGTH) LIKE  W3PARAM-CONT_LEN

*"     VALUE(RETUN_CODE) LIKE  W3PARAM-RET_CODE

*"----------------------------------------------------------------------

DATA: name TYPE STRING.

SORT QUERY_STRING DESCENDING.

READ TABLE QUERY_STRING WITH KEY NAME = '_name'.

name = QUERY_STRING-VALUE.

DATA: htmldoc LIKE LINE OF HTML.

CONCATENATE '{"results":[{"key": "name", "value": "' name '"},{"key": "phone", "value": "911"}]}' INTO htmldoc-line.

INSERT htmldoc INTO TABLE HTML.

Sudarsan.S

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
Former Member
0 Kudos

And if you'd posted the URL earlier you would have got Tamas' answer earlier. I hope this now gets you up and running, but next time please give us more information up front rather than leaving us to extract it from you one piece at a time. It is much easier to help you when we have all the relevant information at the start.

Steve.

Former Member
0 Kudos

Hi tamas,

when i tried to give same as suggested by you above,

i am getting error as  "function module does not exist" in R/3 system.

suggest me how to avoid this error..

thanks in Advance.

sudarsan.S

Former Member
0 Kudos

Hi Steve,

My apologises for this.

i will review my mistake and  im ensure next time it would not continue again.

Thanks.

sudarsan.S

Former Member
0 Kudos

You get that message, oddly, when the function you are trying to call doesn't exist. Can you display this function, Z_WEBRFC_QM01, in SM37? Is it active? Can you run it in test mode in SM37?

Once more, after incorporating the change to the URL that Tamas has suggested, can you please post the URL you are giving to the browser, just to be sure there's nothing still wrong with it.

If all of those are true then it and you still can't call it via webRFC then I think you might need to create an OSS message about it.

You get a different message if the function exists but is not released for internet use, so that's not the problem.

Steve.

Former Member
0 Kudos

Hi Steve,

i've checked whether the function module available in se37 or not.

It is Available and it is remotely enabled. I've executed and checked the function module.

Here i am giving the URL that i am trying to call webrfc.

http://hllsap137.in.u1609.unilever.com:8000/sap/bc/webrfc?_FUNCTION=Z_WEBRFC_QM01_name=SUDARSAN&sap-...

But still i have received the error as function module does not exist.

do i need to configure this function module in SICF so it will be called?

Please suggest.

thanks in advance.

Sudarsan.S

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

That URL is still not correct.

Put an & between the FM name and the parameter _name, then it should work.

Former Member
0 Kudos

The URL is still wrong. This one is trying to call the function Z_WEBRFC_QM01_name, since you forgot the '&' separator. Try this:

http://hllsap137.in.u1609.unilever.com:8000/sap/bc/webrfc?_FUNCTION=Z_WEBRFC_QM01&_name=SUDARSAN&sap...

Steve.

Former Member
0 Kudos

Snap! You beat me to it, just...

Steve.

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

I had less to type

Former Member
0 Kudos

Tamas,

did i made any mistake in creating the URL?

Please suggest.'

sudarsan.S

Former Member
0 Kudos

Perhaps if you gave us some more detail of what you've done? Can you call the WebRFC directly in the browser? Post your code so we can see how you are calling it from Personas.

Did you read this blog - ?

Steve.