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

Setting Attribute Property of 'Read-Only'

$
0
0

Hello,

 

I have a web dynpro application that has two views.  The first view has an input field called 'MATNR'.  The second view also has this field, but I would like to make it 'Read-Only' in this view.  I cam up with a possible solution after searching SCN and the internet, but it doesn't work.  Can anyone help with this problem ?  My code is as follows inside the WDDOMODIFYVIEW method in the second view.

 

Data:  lr_node TYPE REF TO if_wd_context_node.

          lr_elem TYPE REF TO if_wd_context_element.

          lv_bool TYPE wdy_Boolean.

 

lr_node = wd_context->get_child_node( NAME = PRODUCT1NODE ).

lr_elem = lr_node->get_element( index = 1 ).

 

lv_bool = ABAP_TRUE.

 

CALL METHOD lr_elem->set_attribute_property

        EXPORTING

               attribute_name = 'MATNR'

               property            = lr_elem->e_property-read_only

               value                = lv_bool.

 

 

Thank you,

Mike


Viewing all articles
Browse latest Browse all 3667

Trending Articles



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