on 04-19-2014 4:41 PM
Hi ALL, We want to provide Mandatory fields/validations on 3 fields in table view. Initially when the view is loaded they should be highlighted with RED mark indicating them Mandatory and if the users presses enter with empty values, it should give message in application log.
Also this table view is in the guided activity page. So if the user clicks on the Next button in the Roadmap view, the validation in the loaded view should take place and restrict the user to navigate to Next screen with message in application log.
Thanks
Prasad
Hi Prasad,
There are 2 requirements: First making table view fields mandatory and validations on guided navigation next button.
For 1st requirement: First making table view fields mandatory
This facility is not provided for table view fields. Usually there is an option called fields properties, but not available for table view fields. Put your validations in do_validate_input or do_prepare_output method by using below code for raising error messages:
DATA : lr_msg_srv TYPE REF TO cl_bsp_wd_message_service.
CALL METHOD cl_bsp_wd_message_service=>get_instance
RECEIVING
rv_result = lr_msg_srv.
CHECK lr_msg_srv IS BOUND.
lr_msg_srv->add_message(
iv_msg_type = messtype
iv_msg_id = messid
iv_msg_number = messno
).
For 2nd requirement: validations on guided navigation next button
There is a sample guided bsp component available called UIF_TBUI_SAMPLE, view UIF_TBUI_SAMPLE/GuidedFlightBooking which can match your requirement, i hope.
There go to your view impl class, go to its super class, again go to its super class ending with "_VS", mostly the class will be CL_BSP_WD_GEN_ROADMAP_VS. There you will find method "IF_BSP_CONTROLLER~HANDLE_EVENT". At line no 20, the next button event is captured.
So when you will press "NEXT" button on guided page this "NextRoadMapItem" event will get triggered. Redefine this method in your view impl class and do the necessary validation.
All the best
Thanks,
Bhushan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.