Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Disable fields

Former Member
0 Likes
870

Hi guys,

i want disable some fields in Module pool selection screen am writing ths code but not triggering... plz any one help me about on this issusse.. here is the code

Data: v_find TYPE c value 'X',

ok_code LIKE sy-ucomm.

Case ok_code.

WHEN 'SEL_ARCHIVE'.

IF NOT v_find IS INITIAL.

LOOP AT SCREEN.

IF screen-group1 = 'MOD'.

screen-input = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Endcase.

here the program is Syntactically right but when am debugging its not triggering....

4 REPLIES 4
Read only

gopi_narendra
Active Contributor
0 Likes
629

the changing of screen attributes should not be done in the USER_COMMAND. where as it should be done only in the PBO of that particular screen.

Regards

Gopi

Read only

Former Member
0 Likes
629

Hi,

Do the same code in the PROCESS BEFORE OUTPUT event..

Thanks,

Naren

Read only

Former Member
0 Likes
629

Hi,

For disabling the fields no need of writing code in MPP . Go to special attributes here u can find the many check boxes for declaring the field as mandatory , invisible , password..... U check the check box mentioned for invisible.

Thank You

Siva

Read only

former_member196299
Active Contributor
0 Likes
629

hi Murali ,

For disabling any screen field element you should write SCREEN-INPUT = '0', where you have mentioned as 1 .change it and try again .

There are few methods which are supposed to be followed duing module pool programming .

1 ) Do not do tyhe data declaration anywhere except in the TOP include or at the begining of your program whcih you need to check in your code .

2) Any operation related to the screens should be done in separate module in the PBO and PAI events .

Try this code and write it in the PAI of your screen flow logic :

Data: v_find TYPE c value 'X',

ok_code LIKE sy-ucomm.

Case ok_code.

WHEN 'SEL_ARCHIVE'.

IF NOT v_find IS INITIAL.

LOOP AT SCREEN.

IF screen-group1 = 'MOD'.

screen-input = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Endcase.

Revert if further assistance needed !

Regards,

Ranjita