cancel
Showing results for 
Search instead for 
Did you mean: 

Moving value from one page to another

Former Member
0 Kudos

I have completed my first BSP page, and it is working fine. Thanks to all the memebers of this group for their help. I am now creating a home BSP page where the user will enter a Service Notificaiton number. It is a very simple page with one inputField and two buttons. I have the page working where when one of the buttons is selected, the next BSP page is called. The problem is that I am not passing the Service Notificaiton number to the second page. I have gone through the forum and tried what example I think will fit. I have also gone to the tuturial and copied the code form the Book store example, and my properties mode is set to stateful I am lost, and can use some help.

Here is the code form the OnInputProcessing of the home page

 
CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
*Test to see if this event is triggered from one of the buttons
  DATA: event TYPE REF TO CL_HTMLB_EVENT.
  event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).

  if event->name = 'button' and event->event_type = 'click'.
      data: button_event type ref to cl_htmlb_event_button.
      button_event ?= event.
  endif.
case event->id.

    when 'workorder'.
      data caseNo type ref to CL_HTMLB_INPUTFIELD.
      caseNo ?=  CL_HTMLB_MANAGER=>GET_DATA(
                  request = runtime->server->request
                  name = 'inputField'
                  id = 'serviceCase'
                  ).
     IF caseNo IS NOT INITIAL.
      T_QMNUM = caseNo->value.
      navigation->set_parameter('T_QMNUM').
      navigation->next_page('TOWORKORDER').
     EndIF.
     when 'report'.
     IF caseNo IS NOT INITIAL.
      T_QMNUM = caseNo->value.
      navigation->set_parameter('T_QMNUM').
      navigation->next_page('TOSERVICEREPORT').
     EndIF.
    when others.
endcase.

IN debug I can see that the input filed is passing a value to T_QMNUM, so I beleive that part is working.

In the page attribues I have T_QMNUM defined as

T_QMNUM TYPE STRING

Here is the code from the OnInitialization page of the next BSP page:

Take notification case number from fshome.htm page and transfer to workorder.htm

move T_QMNUM to P_QMNUM.

In the page TOWORKORDER I have defined T_QMNUM as

T_QMNUM TYPE STRING

with the auto box checked.

I must be doing something very simple wrong, but I can not see it.

Thanks all for your help.

John

Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Kudos


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

(name = parameter name in the target page)

  navigation->goto_page( 'workorder.htm' ).
Former Member
0 Kudos

Thank you for the help. I did try that statment, but guess I did not read enough to understand that I had to define 'name' But now I am getting another error, T_QMNUM is not a formal parameter. I check on my goto page and have it defined in Page Attributes and that it is automatic.

athavanraja
Active Contributor
0 Kudos

navigation->set_parameter( name = 'T_QMNUM'  
                              value = T_QMNUM ).
 navigation->goto_page( 'workorder.htm' ).

if the above code is written on the oninputprocessing page of say pagea.htm

in set parameters method

name = name of the page attribute in the target page

value = value to be passed (either static or a variable holding the value)

Former Member
0 Kudos

Thanks everybody. Problem solved

Answers (1)

Answers (1)

former_member233090
Active Contributor
0 Kudos

hi,

Hope looking at the above code.. ur problem will definately sloved...

cheers

bhavana