Skip to Content
author's profile photo
Former Member

BSP doesn't get parameter

Hello guys,

I'm a BSP Newbie and have some problems to give two parameters from one BSP to another BSP. That's my abapcode in the eventhandler (onInputProcessing):

SELECT * FROM bscustomer INTO wa

WHERE customerid = customerid AND

usrpwd = pwd.

Nachname = wa-surname.

title = wa-title.

ENDSELECT.

navigation->set_parameter( 'Nachname' ).

navigation->set_parameter( 'title' ).

navigation->goto_page('Welcome.htm').

The page Welcome.htm does not receive any parameter. I tried a lot of stuff like different syntax, for example:

navigation->set_parameter( name = 'title' value = title ).

or

SET PARAMETER ID Nachname FIELD Nachname.

The start and destination page have both the page attributes 'Nachname' and 'title' and in the destination page I marked the auto-flag.

I tried also to change the SELECT statement in SELECT SINGLE and so on. Maybe there is my mistake, I don't know, because I'm also not able to debug the code. ICM is running (green), HTTP Debugging is on and I put some breakpoints in the code. But when I start debugging he jumps somewhere from debugger to Internet Explorer showing me my BSP page and does not come back to debugger, so that I can check my parameters.

Please help me!

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • author's profile photo
    Former Member
    Jul 26, 2004 at 01:52 PM

    OSS problem previously found: "I have find out why it was not possible to debug. The system parameter rfc/ext_debugging must have the value 3."

    That might help with the debugging. Be sure to set your breakpoint as an External Breakpoint. For me at least it's the only way to get my debugging to work.

    As for reading a parameter I simply do:

    <b>Start page</b>

    Layout:

    <htmlb:inputField id      = "inputfield1"
                                visible = "true" />
    

    Submit page after entering value of course.

    <b>Result page</b>

    Page Attribute:

    myStart TYPE STRING.

    In my event handler:

    DATA: myReq TYPE REF TO CL_HTMLB_INPUTFIELD.
    
    myReq ?= CL_HTMLB_MANAGER=>GET_DATA( request = request
                                      id = 'inputfield1'
                                      name = 'inputfield' ).
    myStart = myReq->value.
    

    Then in the layout:

    Parameter was: <%= myStart %>
    

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Jul 26, 2004 at 01:55 PM

    Hello Heiko,

    have you checked the "auto" flag in the page attribute list? Then the BSP framework will retrieve the data automatically from the request for you.

    Otherwise you have to get the data by your own:

    lv_value = request->get_form_field( <name_of_variable> ).
    

    Regards, Bernd

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Bernd,

      I allready checked the "auto" flag in the page attribute list. It didn't function... 😔

      lv_value = request->get_form_field( <name_of_variable> ).

      Didn't run, too.

      Maybe, because of that 'Nachname' and 'title' (the two parameter for the destination page) are not fields in the form of the start page.

      In my start page I use a form with the fields 'customerID' and 'pwd' to login. With this two parameters I look in the table bscustomer to get my both parameters 'Nachname' and 'title' and this two parameters I want to send to the destination page "Welcome.htm" (For Details, have a look at the code in my posted question).

      Regards,

      Heiko

  • author's profile photo
    Former Member
    Jul 26, 2004 at 02:09 PM

    Craig,

    If you look at the request class, you will see that the value is string type.

    Regards,

    Iwan

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Jul 26, 2004 at 03:33 PM

    Hello Heiko,

    I have also had this parameters problem when I began with BSP. I would suggest you to try to add this piece of code :

    data: req type string.
    concatenate 'Welcome.htm?Nachname=' Nachname '&title=' title into req.
    navigation->goto_page( req ).

    The last line replacing your navigation->goto_page('Welcome.htm') of course. I hope it will help.

    Regards,

    François

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello François,

      thanks a lot for your help!!!

      Your code works!

      I tried yesterday 6 hours to set the parameters for the next BSP. I tried nearly everything! I became crazy, because I use the same procedure with this two parameters at another BSP and there it works like SAP described it in the tutorials.

      Best Regards,

      Heiko

  • Jul 26, 2004 at 08:04 PM

    Hallo Heiko,

    > abapcode in the eventhandler (onInputProcessing):

    Are you sure this event handler code was ever processed?

    > navigation->set_parameter( 'Nachname' ).

    Of course, you will have to set both the name and the value. This code above sets no value.

    > navigation->set_parameter( name = 'title' value = title ).

    Should have worked. Maybe title was empty?

    > SET PARAMETER ID Nachname FIELD Nachname.

    Definitely irrelevant. Playes zero role here.

    > .. change the SELECT statement in SELECT SINGLE

    Plays zero role. You could have deleted all of this, and just hardwired the attributes.

    > Please help me!

    Only you can help yourself. We can only give you a little guidance. The (hard) work you will have to do youself. Unfortunately from this total description, I can see no obvious problems.

    So let me just give you an example. Paste it in, and play a little with it.

    Create a new BSP application, with two pages: pageA.htm and pageB.htm. Use code below.

    <u><b>pageA.htm Layout</b></u>
    <html><body><form>
      <input name="A" value="123"> <br>
      <input name="B" value="456"> <br>
      <input type="submit" name="OnInputProcessing"
                           value="HitMe!">
    </form></body></html>
    
    <u><b>pageA.htm OnInputProcessing</b></u>
     DATA: a TYPE STRING,
           b TYPE STRING.
     a = request->get_form_field( 'A' ).
     b = request->get_form_field( 'B' ).   
     IF a IS NOT INITIAL AND b IS NOT INITIAL.
       navigation->set_parameter( name = 'A' value = a ).
       navigation->set_parameter( name = 'B' value = b ).
       navigation->goto_page('pageB.htm').
     ENDIF.
    
    <u><b>pageB.htm Layout</b></u>
    <%
         DATA: a TYPE STRING,
               b TYPE STRING.
         a = request->get_form_field( 'A' ).
         b = request->get_form_field( 'B' ).   
    %>
    <html><body><form>
      <input name="A" value="<%=a%>" readonly> <br>
      <input name="B" value="<%=b%>" readonly> <br>
    </form></body></html>
    

    This example is very primitive. It is just to give you a very first step that should work.

    In a quiet moment, also read this document if you have not yet done so! It is food for newbies.

    BSP Trouble Shooting: Getting Help

    /people/brian.mckellar/blog/2004/06/11/bsp-trouble-shooting-getting-help

    ++bcm

    Add comment
    10|10000 characters needed characters exceeded