Sample BSP Application to Display Message(Validation) in status bar:
Create a bsp application ànd right click on object and create a page give the attributes of page.
Click on object Click navigation tab and write it as follows:
In this program we are defining two pages(first page-first.htm, second page-second.htm)
For navigation we need to maintain relation for two pages.
In first page-->LAYOUT tab write the following code:
Event handler-->On inputprocessing:
* event handler for checking and processing user input and
* for defining navigation
DATA:
w_event TYPE REF TO cl_htmlb_event,
w_object TYPE REF TO object,
w_input TYPE REF TO cl_htmlb_inputfield,
w_input1 TYPE string,
w_carrid TYPE sflight-carrid.
CALL METHOD cl_htmlb_manager=>get_event EXPORTING
request = runtime->server->request
RECEIVING
event = w_event.
IF w_event->id = 'get'.
navigation->set_parameter( 'carrid' ).
navigation->next_page( 'NEXT' ).
ENDIF.
Types definition tab:
Write the following code in types definition tab:
types:
t_table type table of sflight.
Declare Page attributes:
In second page-->Layout tab:
*Second page Event handler-->on inputprocessing tab:
*data:
w_event type ref to cl_htmlb_event,
w_object type ref to object,
w_input type ref to cl_htmlb_inputfield,
w_input1 type string,
w_carrid type sflight-carrid.
call method cl_htmlb_manager=>get_event
exporting
request = runtime->server->request
receiving
event = w_event.
if w_event->id = 'get'.
navigation->set_parameter( 'carrid' ).
navigation->next_page( 'NEXT' ).
endif.
Define Second page-->page attribute:
Second page type definition as follows:
types:
t_table type table of sflight.
OUTPUT:
Enter a carrid :
Enter carrid and click on submit button:
Check the records for selected carrid: For validations and for error messages check it by entering non existing carrid:
For messages enter invalid carrid :
You can check error message :
Check the error message when you are not entering any carrid(Carrid range is initial)
1 Comment
Unknown User (c5jzifv)
where is the field fi_flag set in your program?