cancel
Showing results for 
Search instead for 
Did you mean: 

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

dhinesh_thirugnanam
Active Participant
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

RicardoRomero_1
Active Contributor
0 Kudos

Hi,


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

   DATA: lo_PDO_BASE  Type Ref To /SAPSRM/CL_PDO_BASE,

             lo_pdo       TYPE REF TO /SAPSRM/IF_PDO_XO,

             lv_mode      TYPE /SAPSRM/PDO_INST_MODE.

     lo_pdo = WD_COMP_CONTROLLER->MO_BOM->/SAPSRM/IF_CLL_XO_MAPPER~GET_PDO( ).

     lo_pdo_base ?= lo_pdo.

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

Answers (1)

Answers (1)

0 Kudos

Hi,

Set attribute STREETS_DISP  type of 'WDY_BOOLEAN'.

Then set value lv_street5 = abap_true instead of X