Skip to Content
author's profile photo
Former Member

BSP Element - calling a function

I've just started working with creating custom BSP extensions. They work just fine so far, however, when I try to call a function from within the IF_BSP_ELEMENT~DO_AT_BEGINNING method (I redfined it) i always get back a "communication" or "system failure" from the function.

BSP - index.htm calls BSP Element

BSP Element - function calls remote function

remote function returns "communication or system failure"

Code direct on page works but not through the BSP Element.

I am rather week on the BSP elements so perhaps I am applying the function call in the wrong method? I followed the example given on page 386 of "Web Programming with the SAP WEB APPLICATION SERVER". It worked great I am output just fine and dandy but this one function calling the other function doesn't seem to work in the BSP Element??

Suggestions?? I've tried running traces and debugging but I can't see anything wrong and the remote system doens't have any short dumps or anything.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Jul 22, 2004 at 02:50 PM

    Craig,

    Are you sure that you write that the function call inside a BSP page works and it works correctly, but not inside a tag? Are you really sure that this is exactly the same source code? The tag is just a class. When you are debugging BSP application, you will see that we just create the class, and then call the START method. No real magic there.

    If this is true, then maybe you can make another test. Create a new class CL_XYZ. Make a method M1(). Place you code inside this method. On the BSP page write:

    <%
      DATA: obj TYPE REF TO CL_XYZ.
      CREATE OBJECT obj.
      obj->M1( ).
    %>
    

    Just for your information, from an OSS problem we had previously: "I have find out why it was not possible to debug. The system parameter rfc/ext_debugging must have the value 3."

    ++bcm

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks again for the help - we managed to get our debugging to work (value 3) and we saw that the error was quite simple.

      I had the attribute for the BSP Element as STRING and it was different for the FM. Well the FM got the value but it got it with a trailing "#" - don't know why though. So we changed the attribute for the element to match the FM and now it works beautifully.