‎2009 Jul 15 7:31 AM
HI
We have a pushbutton in selection screen. We need to make that an mandatory field.
Please help.
Thanks in advance.
SS
‎2009 Jul 15 7:32 AM
Hi,
Use OBLIGATORY key word at the end of required selection-option.
‎2009 Jul 15 7:32 AM
Hi,
Use OBLIGATORY key word at the end of required selection-option.
‎2009 Jul 15 7:33 AM
‎2009 Jul 15 7:37 AM
Hi Swarna,
Well you cannot use it as Obligatory in the selection screen similar to the fields. You can do is put a validation in the selection screen output like:
IF sy-ucomm <> 'ABC'. "something similar to this logic
error message.
endif.
Regards,
FS
‎2009 Jul 15 7:37 AM
Hi,
give more information.
Push button Mandatory?
regards,
Rama reddy
‎2009 Jul 15 7:40 AM
Yes, i need to make the pushbutton mandatory.
I have already used a function code to process some logic. So i cant use as per my requirement. This button needs to be pressed some how.
‎2009 Jul 15 7:47 AM
Dear Swarna,
You can do this by using the following logic,
if sy-ucomm eq 'PUS'.
"ur logic
else.
"error message to click on push
endif.Regards
Sajid
‎2009 Jul 15 8:02 AM
Hi,
If that's your requirement, what you could do is, Check if your SY-UCOMM value is the function code of the button that you pressed and not any other event. Also, adding to this functionality, if you want to press only button2 and not any other after an event like clicking button1, then you can store the SY-UCOMM value of the button1 in OK_CODE and then check if the OK_CODE is 'but1' and SY-UCOMM eq 'but2' and proceed accordingly.
Display an information message asking the user to click on the button before proceeding.
if sy-ucomm ne 'but1'
"display error message
else.
"Go ahead with your logic
endif.
‎2009 Jul 15 8:04 AM
Hi sundararaman,
write this code in AT seelction screen.
IF sy-ucomm NE 'PUSH'.
MESSAGE 'Push button is mandatory' TYPE 'E'.
endif.
Thanks,
Ajay
‎2009 Jul 15 8:11 AM
Is it possible to create an icon on the pushbutton if cant make it mandatory?
‎2009 Jul 15 8:39 AM
hi,
Use FM 'ICON_CREATE'
check this link
http://help.sap.com/saphelp_nw04/helpdata/en/59/348efa61c611d295750000e8353423/frameset.htm
thanks