|Home • Trainings • Quiz • Tips • Tutorials • Functional • Cert Q's • Interview Q's • Jobs • Testimonials • Advertise • Contact Us|
BSP Application on using a tree
In the ‘Page Attributes, of treepage.htm, enter the attributes as shown
need our application to display the data by giving the input in the inputbox and
when the treenode is clicked.
we write the code in the ‘OnInputProcessing’ event.
the ‘Event Handler’ tab of treepage.htm, under ‘OnInputProcessing’
event, write the following code.
Code: * event handler for checking and processing user input and * for defining navigation DATA: event TYPE REF TO CL_HTMLB_EVENT. event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
DATA: MATNO_low TYPE REF TO CL_HTMLB_INPUTFIELD. MATNO_low ?= CL_HTMLB_MANAGER=>GET_DATA( REQUEST = RUNTIME->SERVER->REQUEST NAME = 'inputField' ID = 'p_MATNR_low' ). DATA: MATNO_high TYPE REF TO CL_HTMLB_INPUTFIELD. MATNO_high ?= CL_HTMLB_MANAGER=>GET_DATA( REQUEST = RUNTIME->SERVER->REQUEST NAME = 'inputField' ID = 'p_MATNR_high' ).
DATA: tree_event TYPE REF TO CL_HTMLB_EVENT_TREE. tree_event ?= event.
node = tree_event->node.
if matno_low is not initial and matno_high is not initial.
matnr_low = matno_low->value. matnr_high = matno_high->value.
case node. when 'mara'.
select * from mara into table it_mara where matnr between matnr_low and matnr_high.
select * from mard into table it_mard where matnr between matnr_low and matnr_high.
Save, Check and activate the treepage.htm. Save, check and activate the
Enter the login details in the window to continue executing the
The screen looks as shown below. Input the values as
shown below and click on the treenode named ‘mara’.
The output looks as follows.
Now click on the treenode ‘mard’ for the storage location data of the
we are done with displaying the table contents using ‘tree’ on the BSP
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM
©2006-2007 SAPTechnical.COM. All rights reserved.
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG.
Graphic Design by Round the Bend Wizards