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

pushbutton in selection screen

Former Member
0 Likes
1,040

Hi all

i want to deactivate a pushbutton in selection screen.

please help me...its urgent

rewards assured..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
868

can u explain ur requirment clearly...

9 REPLIES 9
Read only

Former Member
0 Likes
869

can u explain ur requirment clearly...

Read only

Former Member
0 Likes
868

HI,

Assign a MODIF-ID to this pushbutton. and in the AT SELECTIOn-SCREEN OUTPUT event use the LOOP AT SCREEN to deactivate the button.

Regards

Subbu

Read only

naimesh_patel
Active Contributor
0 Likes
868

Hello,

Try this

SELECTION-SCREEN PUSHBUTTON 1(15) P_PP USER-COMMAND PUS MODIF ID GP1.

INITIALIZATION.

P_PP = 'tEST'.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'GP1'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Regards,

Naimesh

Read only

Former Member
0 Likes
868

If ur requirement is to deactivate standard buttons provided by SAP in the selection the check the following program

REPORT demo_sel_screen_status.

DATA itab TYPE TABLE OF sy-ucomm.

PARAMETERS test(10) TYPE c.

AT SELECTION-SCREEN OUTPUT.

APPEND: 'PRIN' TO itab,

'SPOS' TO itab.

CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

EXPORTING

p_status = sy-pfkey

TABLES

p_exclude = itab.

Read only

0 Likes
868

Hi all

i am able to deactivate pushbutton w/o using MODIF ID.

LOOP AT SCREEN

in place of MODIF ID if i give pushbutton name that is also deactivating pushbutton.

So, wats the use of MODIF ID?

or wats the flaw in my approach.

Your suggestions will be appreciated.

Read only

0 Likes
868

Hi gaurav,

1. So, wats the use of MODIF ID?

or wats the flaw in my approach

Theres no flaw in your approach.

2. Further, you are right.

Whats the use of MODIF ID

For buttons, we can use the name of the button.

3. But if there is some parameter

(along with LABEL on the left,

or a radiobutton, with some text),

4.

Then with MODIF ID, the label also gets

affected.

(whereas if we just use the parameter name,

the label may still remain)

5. To get the differnce, just copy paste

6.

report abc.

parameter : abc(10) type c MODIF ID A.

At selection-screen output.

*----


ONCE CHECK WITH THIS CODE

loop at screen.

if screen-name = 'ABC'.

screen-input = 0.

screen-invisible = 1.

modify screen.

endif.

endloop.

**----


THEN CHECK WITH THIS CODE

  • loop at screen.

  • if screen-GROUP1 = 'A'.

  • screen-input = 0.

  • screen-invisible = 1.

  • modify screen.

  • endif.

  • endloop.

regards,

amit m.

Read only

0 Likes
868

ya .got it.

if SCREEN-GROUPID = 'mODIF ID name'

if SCREEN-NAME = 'function code of pushb'

It works for both......

still i need more explanation on MODIF ID.please

Points hav been assigned to all who have replied to this post......

Thanks a lot all of you

Read only

0 Likes
868

Thanks a lot amit.....

got it now

Read only

Former Member
0 Likes
868

Hi again,

1. suppose u have 5 different textboxes / buttons,

to make disable.

2. So instead of using their

NAMES (5 different names),

we can assign them,

just ONE MODIF ID,

and

SIMULATNEOUSLY / AT ONE SHOT,

make all 5 disable.

3. Similarly, we can use this modif ID,

for ANOTHER GROUP OF ELEMENTS,

to bunch them together.

regards,

amit m.