cancel
Showing results for 
Search instead for 
Did you mean: 

Pointer in Input Field UI element

former_member222068
Active Participant
0 Kudos

Hi Friends,

   My requirement : When Web Dynpro application is executed, pointer should be placed in Input Field UI element automatically. Kinldy can some one help me out regarding this.

Regards,

sankar

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi,

Write the below code in WDDOMODIFYVIEW method.

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.

lo_node = wd_context->get_child_node( name = wd_this->wdctx_att1 ).

lo_element = lo_node->get_element( ).

  if first_time = abap_true.

  lo_view_contr = wd_this->wd_get_api( ).

  lo_view_contr->request_focus( exporting context_element = lo_element

                                          attribute = 'ATT1' ).  " here att1 is the attribute name

  endif.

Hope this helps u.,

Thanks & Regards,

Kiran.

former_member222068
Active Participant
0 Kudos

Hi kiran,

  What is the type of attribute.

Regards,

sankar

former_member222068
Active Participant
0 Kudos

Hi Kiran,

  can you tell me to which property of input field should i bind this attribute and what should be the type of attribute.

former_member184578
Active Contributor
0 Kudos

Hi,

let say you created an attribute ATTR1 in context ( of any type ), read that attribute in WDDOMODIFY view using code wizard , then use the above method request_focus of view controller by passing context element and attribute name.

Revert back for further clarifications.,

Edited:

Hi.,

Ley say you created an input field in view and binded the value of input Field to ATTR1 in context, then use the above mentioned code. no need to bind to any other property. jus do normal binding of value of input field.

Thanks & Regards,

Kiran.

Answers (0)