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

Dialog programming

Former Member
0 Likes
463

hi abapers,

Can anyone help me with the code to disable the text fields created in dialog prgming...

Also how to disable the buttons in screens (Module pool)

1 ACCEPTED SOLUTION
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
447

HI,

You just need to put this code in the PBO of the screen in a PBO module.

LOOP AT SCREEN.

IF SCREEN-NAME = 'Field or button name you want to hide'.

SCREEN-ACTIVE = 0.

MODIFY SCREEN

ENDIF.

ENDLOOP.

Regards,

Sesh

4 REPLIES 4
Read only

Former Member
0 Likes
447

Hi,

In the PBO Module,

Use the following code :

LOOP AT SCREEN.

IF SCREEN-NAME = FIELD1.

SCREEN-OUTPUT = 1.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

This will make a text field as uneditable.

Also, for a button created on the screen itself u can use the following :

LOOP AT SCREEN.

IF SCREEN-NAME = BTN1.

SCREEN-ACTIVE = 0.

MODIFY SCREEN.

ENDIF.

This shud disable the button.

Regards,

Himanshu

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
448

HI,

You just need to put this code in the PBO of the screen in a PBO module.

LOOP AT SCREEN.

IF SCREEN-NAME = 'Field or button name you want to hide'.

SCREEN-ACTIVE = 0.

MODIFY SCREEN

ENDIF.

ENDLOOP.

Regards,

Sesh

Read only

Former Member
0 Likes
447

hi

in the properties of the field u can set this attribute

u uncheck the inputfield

attributes->inputfield->uncheck the checkbox.

Read only

Former Member
0 Likes
447

Hi Maheshkumar,

write this code in PBO of modulepool.

LOOP AT SCREEN.

IF screen-name = i_tab-matnr.

screen-input = 0.

screen-output = 1.

MODIFY SCREEN.

ENDIF.

endloop.

U can disable text fields as well as buttons using <b>screen-name</b> statement.

reward points if helpful

Regards,

Hemant