cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the input field in readonly when processing

Former Member
0 Kudos

Hi Experts,

I don't know whether this question had been asked before, this is my situation.

I have some input fields in my pages, after input and hit the button of 'Save', I want these input fields to be readonly.

How to do this?

Please give some hints on this.

Many thanks!

ANNA

Accepted Solutions (1)

Accepted Solutions (1)

former_member262988
Active Contributor
0 Kudos

Hi,

Declare an attribute READ_ONLY of type WDY_BOOLEAN .....bind the attribute to the read_only property of the input fields.....

On action fo SAVE ....button .....set the READ_ONLY to abap_true...

DATA lo_el_context TYPE REF TO if_wd_context_element.

DATA ls_context TYPE wd_this->element_context.

DATA lv_read_only TYPE wd_this->element_context-read_only.

  • get element via lead selection

lo_el_context = wd_context->get_element( ).

  • set single attribute

CALL METHOD me->set_attribute

EXPORTING

value = abap_true

name = `READ_ONLY`.

Thanks,

Shailaja Ainala.

Answers (1)

Answers (1)

former_member645692
Participant
0 Kudos

Hi,

you can do that in the action of the SAVE button.

There will be a Property called 'READ ONLY' for the Input Field UI element.

Bind that propert to an attribute of type boolean. set the value of that attribute to "X' when the button is pressed.