A Simple BSP application to select a range of Sales Document and display the result on the next Page

...Previous   

 17.   Now Designing the ‘SECOND PAGE’.

18.   Our output on the second page should be in tabular form. So, in our layout we have to define table view like this. 

19.   Here on the Second Page also we have to define the page attributes like this. 

20.   Now we have to write the code in the ‘INITIALIZATION’ event. Because this event triggers when ever a new page is called. 

21.   The code is as follows. 

* event handler for data retrieval
data :
  w_event type ref to cl_htmlb_event ,
  w_eventid type string ,
  w_obj type ref to object ,
  w_obj1 type ref to object ,
  w_vbeln type ref to cl_htmlb_inputfield ,
  w_vbelnval type string ,
  w_vbeln1 type vbap-vbeln ,
  w_vbeln2 type vbap-vbeln .
* Calling Method for w_vbeln
CALL METHOD cl_htmlb_manager=>get_data
  EXPORTING
    request = runtime->server->request
    name    = 'inputfield'
    id      = 'i_vbeln'
  receiving
    data    = w_obj
    .
w_vbeln ?= w_obj .               " Passing the object vale to w_vbeln
w_vbelnval = w_vbeln->value .    " now the value from w_vbeln is passed to
                                 " w_vbelnval
w_vbeln1 = w_vbelnval .          " Now value from w_vbelnva is passed to 
                                 " w_vbeln1
* Here we have called the class cl_htmlb_manager and an instance get_data has * * been created.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING
    input         = w_vbeln1
 IMPORTING
   OUTPUT        = w_vbeln1.
* Function to change external format to the internal format
* Calling Method for w_vbeln
CALL METHOD cl_htmlb_manager=>get_data
  EXPORTING
    request = runtime->server->request
    name    = 'inputfield'
    id      = 'i_vbeln1'
  receiving
    data    = w_obj .
w_vbeln ?= w_obj .               " Passing the object vale to w_vbeln
w_vbelnval = w_vbeln->value .    " now the value from w_vbeln is passed to
                                 " w_vbelnval
w_vbeln2 = w_vbelnval .          " Now value from w_vbelnva is passed to
                                 " w_vbeln2
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING
    input         = w_vbeln2
 IMPORTING
   OUTPUT        = w_vbeln2          .

* Function to change external format to the internal format 

select * from vbap into table t_vbap where vbeln between w_vbeln1 and w_vbeln2. 

22.   Save and activate the application. 

Now when we execute the application. The Screen will be like this. 

 

On Clicking the button ‘Get Data’. The output would be like this. 

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image