Skip to Content

WDA: How to have the field in Dynamically Editable/Read Only mode

Hi All,

I have a field street5.When In display mode I have written the following code to have it in read-only mode.

Similarly when creating it is in Editable mode.

Above conditions work fine.

But when in change mode the field still displays as Read-only mode.

How to make it Editable mode..Sy-ucomm not showing any function code.

On Click of Edit Mode:

Field still shows Display mode. What needs to be done to have it in Editable mode

Code:Select query check whether data in table. If data is there I am displaying as 'Display only mode". When I go to change mode same code is executed,how to restrict it?

screen2.jpg (115.4 kB)
screen1.jpg (118.0 kB)
screen3.jpg (77.9 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Jul 20, 2016 at 10:35 AM


    Create a post-exit in method WDDOMODIFYVIEW and use the following code to know the display mode of the SC:





    lo_pdo_base ?= lo_pdo.

    lv_mode = lo_pdo_base->/sapsrm/if_pdo_base~get_mode( ).

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 20, 2016 at 04:11 AM


    Set attribute STREETS_DISP type of 'WDY_BOOLEAN'.

    Then set value lv_street5 = abap_true instead of X

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.