‎2011 Jan 25 11:27 AM
Hi,
I programmatically fill a SELECT-OPTIONS on event AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_us-low.
As I use a FM ('RHP0_POPUP_F4_SEARK') that allows me to select several entries in a single step, the right pushbtton stays unchanged. I have to press enter to make it go green.
I tried thinks like:
ls_dynpfield-fieldname = '%_S_US_%_APP_%-VALU_PUSH'. " 'S_US-LOW'.
ls_dynpfield-fieldvalue = ICON_DISPLAY_MORE.
APPEND ls_dynpfield TO lt_dynpfields.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
TABLES
dynpfields = lt_dynpfields
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
OTHERS = 8.and it works but it's not that nice !
Any idea how to avoid this behaviour and directly set it green?
Thanks in advance.
Best regards,
Guillaume
‎2011 Jan 25 11:45 AM
Instead of f.m. 'DYNP_VALUES_UPDATE', try to:
loop at <your table value>
your_selectoptions-sign = 'I'.
your_selectoptions-option = 'EQ'.
your_selectoptions-low = value.
append your_selectoptions
endloop.
Regards
Andrea
‎2011 Jan 25 11:45 AM
Instead of f.m. 'DYNP_VALUES_UPDATE', try to:
loop at <your table value>
your_selectoptions-sign = 'I'.
your_selectoptions-option = 'EQ'.
your_selectoptions-low = value.
append your_selectoptions
endloop.
Regards
Andrea
‎2011 Jan 25 1:08 PM
Hi,
I called FM 'DYNP_VALUES_UPDATE' in addition to populating the select-options in a LOOP.
Best regards,
Guillaume
‎2011 Jan 27 2:40 AM
Hi
Guillaume Garcia
U can try following code. it may help you.when I press f4. Colour will change to Green.
REPORT ztest.
tables: mara.
CONSTANTS : tp_mara type C VALUE 'X'.
select-OPTIONS: matnr for mara-matnr..
at SELECTION-SCREEN on VALUE-REQUEST FOR matnr-low.
matnr-sign = 'I'.
matnr-option = 'BT'.
matnr-low = '1'.
matnr-high = '2'.
append matnr.
matnr-sign = 'I'.
matnr-option = 'BT'.
matnr-low = '4'.
matnr-high = '5'.
append matnr.
SUBMIT ZTEST VIA SELECTION-SCREEN WITH matnr IN matnr.
START-OF-SELECTION.
BREAK-POINT.
END-of-SELECTION.Many thanks,
Suyog.
‎2012 Aug 06 1:02 PM
Hi,
Found a new way (1,5 years after...)
SET SCREEN 1000.
LEAVE SCREEN.
Best regards,
Guillaume
‎2012 Aug 06 3:02 PM
Hi,
Just for the grain of sand, you would have achieved this with this simple line of code:
CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'.
pretty usefull fm anyway!
Cheers,
Manu.
‎2012 Aug 07 8:59 AM
Hi,
Didn't know about that one, thx!
I'll keep it for later use.
Does it behave correctly in ITS too? (with this 'SAPGUI' name, one can always wonder...)
Best regards,
Guillaume