‎2014 Feb 19 10:56 AM
Hi techies,
I have selection screen in which 3parameters are there.
If I provide values for the first two parameters then third parameter should be invisible. .
But I can make this achive through at selection screen output but I need to disable that third parameter right after user provides values to above two fields.
He won't press execute button or enter....
‎2014 Feb 19 11:03 AM
Hi Praveen,
You should do that, but you need to press enter.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
* Here you should put your code
MODIFY SCREEN
ENDLOOP.
Best regards
‎2014 Feb 19 11:05 AM
i already mentioned i will not press execute or enter .
if that is to be done , then i can do it .
anyways issue seems simple but its not possible i think .
please techies try .
‎2014 Feb 19 11:13 AM
Of course, but I am telling you that I think you can't do that if you don't press enter buttom. If you used another type like RADIOBUTTOM, you would achieve it.
Best regards
‎2014 Feb 19 11:14 AM
Not possible with the limited event framework of the classic SAPGUI, I'd say. Try Webdynpro, HTML5 or such fancy stuff.
Thomas
‎2014 Feb 19 11:10 AM
Hi Praveen,
I think this is not possible as the control will not takes the values until unless we press Enter or Execute.
-Vijay
‎2014 Feb 19 11:13 AM
ok thanks adrian and vijay
, even am confirming that this may be possible ,
still we will see any other techies can solve it .
‎2014 Feb 19 11:24 AM
Hi Praveen,
If the values of 2nd field is getting filled with F4 Help, try to cll function module DYNP_VALUES_READ in AT SELECTION ON VALUE REQUEST FIELD <filed_2>. This will capture the entered value. So if this FM returns value, try to modify screen.
-Vijay
‎2014 Feb 19 12:43 PM
But values are to be given manually , there is no F4 search help for that field .
‎2014 Feb 19 11:12 AM
Hi Praveen,
you can only solve your issue, if both first parameters are of type checkbox, radiobutton or listbox.
Then you can add a user-command option which raises an event to process the selectioon-screen.
Please have a look at the keyword documentation for PARAMETERS - screen options for more help.
Regards,
Klaus
‎2014 Feb 19 11:17 AM
Hi klaus ,
the first two parameters have values which need to be entered .
how can we do it when they are declared as check box or radio buttons?
‎2014 Feb 19 11:25 AM
Despite I think that it might solve his issue, using radiobuttom or checkbox you will be able to active o choose your option but you won't be able to write values as if they were char parameters.
Best regards
‎2014 Feb 19 11:32 AM
Hi,
please check this code:
REPORT ztest_param.
PARAMETERS: xp_par1 TYPE c AS CHECKBOX USER-COMMAND chk1.
PARAMETERS: xp_par2 TYPE c AS CHECKBOX USER-COMMAND chk2.
PARAMETERS: xp_par3 TYPE matnr MODIF ID xyz.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CHECK screen-group1 EQ 'XYZ'.
IF xp_par1 EQ 'X'
AND xp_par2 EQ 'X'.
screen-active = '0'.
ELSE.
screen-active = '1'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
START-OF-SELECTION.
Regards,
Klaus
‎2014 Feb 19 12:39 PM
Actually i need to enter some values to the first and second parameters .
if we give check box then how can i provide values?
‎2014 Feb 19 11:28 AM
Hi Praveen,
We can't capture the TAB value therefore we have to press 'ENTER'
Check the below code for your reference:-
selection-screen: begin of block b1 .
parameters: pdate like mkpf-budat modif id b1.
parameters: rsnum like resb-rsnum modif id b2 .
parameters: lifnr like mseg-lifnr modif id b3.
selection-screen: end of block b1.
at selection-screen output.
if rsnum <> ' '.
loop at screen .
if screen-group1 = 'B1'.
screen-active = 1.
modify screen.
elseif screen-group1 = 'B2'.
screen-active = 1.
modify screen.
elseif screen-group1 = 'B3'.
screen-active = 0.
modify screen.
endif.
endloop.
endif.
Regards,
Deepanshu
‎2014 Feb 19 11:35 AM
I think that this solution has been already published.
In addition, SAP Screen processing won't trigger SELECTION SCREEN OUTPUT event unless there is an user action like pushing a button, radiobutton , checkbox, selecting a value from a dropdown list, press enter, etc.
Best regards
‎2014 Feb 19 11:38 AM
Hi Praveen,
Since there is no user command option for parameter fields you cannot do it without pressing enter.
Thanks,
Vineesh.
‎2014 Feb 19 12:42 PM
Hi techies ,
can i close this discussion as 'not possible ' ?
‎2014 Feb 19 1:40 PM
Hi Praveen,
You can close the discussion.
For Changing the screen you need to have some event triggered.
You can try this, you can place a check box with the third field and allow user to check it if he wants to enter value in the field and in this event you can validate and enable the field or throw message that values is not required(as per your requirement).
‎2014 Feb 20 7:14 AM
‎2014 Feb 20 8:22 AM
"Not possible" is also an answer, so you should at least set your question to "answered".
Thomas
‎2014 Feb 20 10:10 AM
Hello Praveen,
Try with the below code.
PARAMETERS: xp_par1 TYPE vbeln.
PARAMETERS: xp_par2 TYPE werks.
PARAMETERS: xp_par3 TYPE matnr MODIF ID xyz.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CHECK screen-group1 EQ 'XYZ'.
IF xp_par1 IS NOT INITIAL
AND xp_par2 IS NOT INITIAL.
screen-active = '0'.
ELSE.
screen-active = '1'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Until you enter the first two parameters, third parameter won't be disabled.
‎2014 Feb 20 10:12 AM
This is not what he required. In this case also we need press enter to take action on 3rd Field.