Quantcast
Channel: SCN : All Content - Web Dynpro ABAP
Viewing all articles
Browse latest Browse all 3667

Input-fields are getting reset automatically in browser.

$
0
0

I have developed on Webdynpro application in which I have created one main Webdynpro component and 5 sub components. In the main Webdynpro component I have given a menu option based on the option selected by the user the corresponding Webdynpro component will called and displayed on the right side of the screen.

 

Pic-1.jpg

 

Whenever I click on the menu in left side the corresponding Webdynpro component will called and the view will be displayed in right side as shown below.

Pic-2.jpg

 

I am facing an issue in the selection screen here, whatever the value entered the input field is getting cleared automatically.

 

 

Pic-3.jpg

Whenever I entered data in any of the input field it will get refreshed automatically. Is there anyway to get the input field value while filling the same?

In code also when I check the context node itself not getting filled.

 

It is calling WDDOMODIFYVIEW method of both sub component view as well as main component view. In both cased when I try to read the context node it is initial.

 

Below is the code which I written in the WDDOMODIFYVIEW of both views.

 

DATA: lv_bid_nr TYPE ZBID_NR,

      lv_dat_fr type datum,

      lv_dat_to type datum,

      lv_ernam  type sy-uname.

 

 

  DATA lo_nd_mat_selection TYPE REF TO if_wd_context_node.

  DATA lo_el_mat_selection TYPE REF TO if_wd_context_element.

  DATA ls_mat_selection TYPE wd_this->element_mat_selection.

  DATA lv_created_by TYPE wd_this->element_mat_selection-created_by.

 

 

 

* navigate from <CONTEXT> to <MAT_SELECTION> via lead selection

 

  lo_nd_mat_selection = wd_context->get_child_node( name = wd_this->wdctx_mat_selection ).

  lo_el_mat_selection = lo_nd_mat_selection->get_element( ).

 

  IF lo_el_mat_selection IS NOT INITIAL.

    lo_el_mat_selection->get_attribute(

    EXPORTING

      name =  `CREATED_BY`

    IMPORTING

      value = lv_created_by ).

    lv_ernam = lv_created_by.

    lv_created_by = lv_ernam.

    lo_el_mat_selection->set_attribute(

      name =  `CREATED_BY`

      value = lv_created_by ).

  ENDIF.

 

Here lv_created_by is initial always.

Kindly provide your valuable suggestions....

 

Thanks in advance...

 

Regards,

Pradeep


Viewing all articles
Browse latest Browse all 3667

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>