|Home • Trainings • Quiz • Tips • Tutorials • Functional • Cert Q's • Interview Q's • Jobs • Testimonials • Advertise • Contact Us|
BSP Application using Date Navigator Control
By Raghava Vakada, Mouri Tech Solutions
Displaying the selected date in an Inputfield.
Go to transaction SE80. Select BSP application and input the name of the BSP application that you want to create. Press Enter or click on the display icon.
activate the application.
click on the application name and click à
create à page.
resultant window appears as follows.
name of the page that you want to create.
case it is the ‘first.htm’ that is being created.
name, description of the page,
‘Page with Flow Logic’ radio button and click on ‘continue’.
Now we are
done with creating the pages.
screen should look as shown below.
with providing the layout, attributes and the Event handling
first.htm and put the following code in the layout tab of the page
<%@page language="abap"%> <%@extension name="htmlb" prefix="htmlb"%>
<htmlb:content design="design2003"> <htmlb:page title = "DATE NAVIGATOR "> <htmlb:form> <h2> <htmlb:label for="date" text="DATE" />
<htmlb:inputField id = "mydate" value = "<%= date%>" maxlength = "10" type = "date"/> </h2> <htmlb:dateNavigator id = "myDateNavigator" monthsPerRow = "1" onNavigate = "myOnNavigate" onDayClick = "myOnDayClick" onWeekClick = "myOnWeekClick" onMonthClick = "myOnMonthClick"> </htmlb:dateNavigator>
</htmlb:form> </htmlb:page> </htmlb:content>
the ‘Page Attributes’ of first.htm, enter the attributes as shown below.
need our application to take the date in input field when date is selected from
we write the code in the ‘OnInputProcessing’ event.
in event handler tab for oninputprocessing event.
DATA: date_event TYPE REF TO CL_HTMLB_INPUTFIELD. date_event ?= CL_HTMLB_MANAGER=>GET_DATA( REQUEST = RUNTIME->SERVER->REQUEST NAME = 'inputField' ID = 'mydate' ).
DATA: event TYPE REF TO CL_HTMLB_EVENT. event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
DATA: dateNavigator_event TYPE REF TO CL_HTMLB_EVENT_DATENAVIGATOR. dateNavigator_event ?= event.
if date_event->value is initial. date = dateNavigator_event->day.
elseif date_event->value is not initial. date = dateNavigator_event->day. endif.
Check and activate the first.htm. Save, check and activate the
that execute it. The below screen
would be displayed.
username and password and click on ‘OK’.
page appears as shown below.
date from DateNavigator.
is displayed in input field as shown below.
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