on 07-01-2008 6:51 AM
Hi All,
how to set the UI element focussed when an view is intialised. i came across the method REQUEST_FOCUS_ON_VIEW_ELEM. in this method what is the value to be given in VIEW_ELEMENT parameter.
Thanks,
Selvakumar M.
It expects an object reference to the UI element that you want to set focus on. I_CARRID is the ID that I named the UI element that I want to set the focus on.
method WDDOMODIFYVIEW .
data element type ref to if_wd_view_element.
element ?= view->get_element( 'I_CARRID' ).
if element is not INITIAL.
view->request_focus_on_view_elem( element ).
endif.
endmethod.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
write foolowing code in wddomodify().
DATA:
lo_node TYPE REF TO if_wd_context_node,
lo_element TYPE REF TO if_wd_context_element,
lo_view_contr TYPE REF TO if_wd_view_controller.
BREAK-POINT ID /plmu/ugrp_ui.
lo_node = wd_context->get_child_node( name = wd_this->wdctx_initial_screen ).
lo_element = lo_node->get_element( ).
Set Focus on Field 'User Group'
IF first_time = abap_true.
lo_view_contr = wd_this->wd_get_api( ).
lo_view_contr->request_focus(
EXPORTING context_element = lo_element
attribute = 'USER_GROUP_NAME' ).
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi selvakumar,
U can try the below code:
u have to give the context element instance and the attribute name for which u need the focus.
DATA lo_api TYPE REF TO if_wd_view_controller.
lo_api = wd_this->wd_get_api( ).
lo_api->request_focus(
context_element = <<lo_el_...>>
attribute = <<'ATTRIBUTENAME'>> ).
Thanks,
Router
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.