2014 Jan 16 5:49 AM
How can we disable ENTER button or OK button (top left green color icon) on a selection screen of icon? Please reply ASAP I have tried many ways but couldn't achieve it.
How can we disable ENTER button or OK button (top left green color icon) on a selection screen of icon? Please reply ASAP I have tried many ways but couldn't achieve it.
2014 Jan 16 5:56 AM
In the code below..see the lines in BOLD..explanation is given as to why they are required
-
Code----
selection-screen begin of block b1 with frame title text-001.
parameters: p_vbeln like vbak-vbeln.
selection-screen end of block b1.
selection-screen begin of block b2 with frame title text-002.
parameter: rb1 radiobutton group radi default 'X' user-command ucomm,
rb2 radiobutton group radi.
selection-screen end of block b2.
AT Selection-screen output.
if rb1 = 'X'.
Loop at screen.
if screen-name = 'P_VBELN'.
screen-input = '0'.
endif.
modify screen.
endloop.
else.
Loop at screen.
if screen-name = 'P_VBELN'.
screen-input = '1'.
endif.
modify screen.
endloop.
endif.
-
Explanation----
If the user command is not given,the system will not trigger on the click of radio button..
Once triggered it comes to "At selection screen output"..where we must also mention the case when
radio button 2 is selected RB2 ..the p_vbeln must be input and when RB1 is selected the field
p_vbeln must be display only..Paste the code and see how it works
Then use the logic as desired...
Hope it helps
Regards,
Thiru.
2014 Jan 16 6:00 AM
2014 Jan 16 6:10 AM
Hi,
This is depends on the which transaction you are using! just clear your requirement this is the standard SAP function
2014 Jan 16 7:08 AM
Hi Waseem,
Please give screenshot as its not clear to which button you are referring to(EXECUTE button or something else).
Regards,
Sheetal.
2014 Jan 16 7:21 AM
2014 Jan 16 8:56 AM
Hi Waseem,
This is the method to be used to disable the buttons on selection screen.
AT SELECTION-SCREEN OUTPUT.
DATA gt_ucomm TYPE TABLE OF sy-ucomm.
APPEND: 'ONLI' TO gt_ucomm.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = sy-pfkey "Status GUI for screen 1000
TABLES
p_exclude = gt_ucomm.
The above code removes the Execute button in the selection screen.
If you are talking about the green tick button, it usually does not have any fcode associated with it. Hence whether it is enabled or not, will not make a difference.
You can confirm, if the Green Tick button has any function code by selecting the menu painter (Program - RSSYSTDB, Status - %_00 or whatever is the GUI Status seen from the Menubar System -> Status of the selection screen).
For any button on the selection screen which has a function code, you can disable it by adding it to the internal table gt_ucomm above.
Regards,
Susmitha
2014 Jan 16 11:21 AM
Hi all,
Thanks to everyone for their reply.
I really have a weird requirement - in my selection screen I am navigating from one block to another just by hiding the blocks on the screen.
I have a push button if I press it that should navigate me to other block(same screen).
Now whats happening is even if I don't press the push button by pressing ENTER or clicking on the green button(top left corner) it is navigating to other block. This should not happen.
As the end-users do not have the knowledge of abc of SAP, business wants me to disable that button.
I am able to disable all the other standard buttons expect the green button by using the below code.
'PRIN' TO it_ucomm, "for print
'SPOS' TO it_ucomm, "for SAVE
'ONLI' TO it_ucomm, "for execute
'E' TO it_ucomm, "for back
'ENDE' TO it_ucomm, "for exit
'ECAN' TO it_ucomm. "for cancel
* CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
* EXPORTING
* p_status = sy-pfkey
* TABLES
* p_exclude = it_ucomm.
Will really appreciate if anyone can assist me on this.
2014 Jan 16 11:31 AM
Just educate the user usage of the button! It is not advisable Wasim!
This is not the business requirement, this is the requirement to change the system
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |