Skip to Content

Error in calling webRFC from Persona

Hi experts,

I have a flavor in Persona 2.0 which needs a webRFC. The webRFC has to return multiple values but when I call it in the persona script it returns an error that calling the webRFC failed.

Also, when I try to call the webRFC directly in the browser, it doesn't return any results except the concatenated string.

Here is the code I'm using:

When calling it from the browser, it doesn't return the values and the call to webRFC in persona fails too.

But when I execute the FM directly, it returns all correct values.

I can't see any obvious reasons for it to fail. Please help.

Thanks,

Amee

Capture.JPG (61.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 22, 2015 at 08:03 AM

    Hi Amee,

    please make sure you configured the following things:

    - function module is RFC-enabled (check se37 -> Attributes -> Remote-enabled)

    - your function module is enabled for internet usage (check smw0 -> "internet release" in the top bar -> function modules -> enter your fm and press "release"

    Did you use the right URL to call your fm? Like

    <server>:<port>/sap/bc/webrfc?_FUNCTION=<fm-name>&... ? Also please check if you followed all the steps mentioned here:

    http://scn.sap.com/community/netweaver-as/blog/2012/08/07/webrfc--simply-calling-an-rfc-from-javascript

    Please let me know if that helps.

    Kind regards,

    Christoph

    Add comment
    10|10000 characters needed characters exceeded

    • Actually never mind Christoph, I figured out the problem.

      It was a data issue - one of the values returned contained double quotes " & so probably the script was not able to parse it. Once I removed it, it worked fine.

      Thanks for your help & response!