| Home • Tips • Tutorials • Forums • Certification Q's • Interview Q's • Jobs • Testimonials • Contact Us | ||
Document Categories:
What's New?
Contribute?Sample SpecsWhat's Hot? |
BSP Application on using a treeIn the ‘Page Attributes, of treepage.htm, enter the attributes as shown
below.
We
need our application to display the data by giving the input in the inputbox and
when the treenode is clicked. So
we write the code in the ‘OnInputProcessing’ event. In
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. WHEN 'mard'. select * from mard into table it_mard where matnr between matnr_low and matnr_high. endcase.
endif.
Save, Check and activate the treepage.htm. Save, check and activate the
application. Enter the login details in the window to continue executing the
application.
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
materials.
Now
we are done with displaying the table contents using ‘tree’ on the BSP
Application pages.
|
|
|
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM Home • Contribute • About Us • Privacy • Terms Of Use • Disclaimer • Safe • Companies: Advertise on SAPTechnical.COM | Post Job • Contact Us ©2006-2007 SAPTechnical.COM. All rights reserved. All
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 |
||