01-26-2010 5:42 AM
Users are asked to choose value from a custom pop-up list in AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_xxxx event.
And based on the value returned, some parameters will be set invisible or visible instantly by loop screen It work well for making parameters invisible instantly. However, I can not make those invisible parameters become visible again at once until ENTER is pressed.
Did I miss anything important? Thanks.
01-26-2010 6:12 AM
Hi George,
Please try using the Event AT Selection-Screen Output and manipulate accordingly......
And in SAP until a User-Command is entered nothing Works ,so i think according to Your Logic Enter is must so try the above.......
Regards
Arbind
01-26-2010 6:12 AM
Hi George,
Please try using the Event AT Selection-Screen Output and manipulate accordingly......
And in SAP until a User-Command is entered nothing Works ,so i think according to Your Logic Enter is must so try the above.......
Regards
Arbind
01-26-2010 7:29 AM
Thanks for your reply Arbind.
In fact I tried AT Selection-Screen Output before but neither visible nor invisible change were instant.
01-26-2010 7:42 AM
Hi,
I know that w/o user interaction nothing can be done.
So Enter is required ....
just try to set a flag and according to flag u call At Selection-Screen Output Event.
Try it.
Regards
Arbind
01-27-2010 8:11 AM
Here's a way you could make it work... the "hit_enter" form is the trick.
Jonathan
report zsdn_jc_f4_with_refresh.
data:
g_hide_onoff type sap_bool.
parameters:
p_date1 type sy-datum,
p_date2 type sy-datum,
p_onoff type sy-ucomm modif id hid.
at selection-screen output.
p_onoff = 'This field disappears and reappears'.
loop at screen.
if screen-group1 = 'HID'.
screen-input = '0'.
if g_hide_onoff = 'X'.
screen-invisible = '1'.
endif.
modify screen.
endif.
endloop.
at selection-screen on value-request for p_date1.
* Select a date to un-hide "p_onoff"
call function 'F4_DATE'
exporting
date_for_first_month = sy-datum
importing
select_date = p_date1
exceptions
others = 0.
g_hide_onoff = ' '.
perform hit_enter.
at selection-screen on value-request for p_date2.
* Select a date to hide "p_onoff"
call function 'F4_DATE'
exporting
date_for_first_month = sy-datum
importing
select_date = p_date2
exceptions
others = 0.
g_hide_onoff = 'X'.
perform hit_enter.
*&---------------------------------------------------------------------*
*& Form hit_enter
*&---------------------------------------------------------------------*
form hit_enter.
* Mimic user hitting Enter
call function 'SAPGUI_SET_FUNCTIONCODE'
exporting
functioncode = '=00'
exceptions
others = 0.
endform. "hit_enter
01-28-2010 8:04 AM
Johnathan thx for your answer, SAPGUI_SET_FUNCTIONCODE just solved my problem.
I noted the hit_enter also trigger AT SELECTION-SCREEN event which includes some customized selection validating functions. To skip these functions after changing visibility of parameters, I hv to use a flag for that.