Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

[Selection Screen] Select-Options populate mult. values & Green pushbutton

guillaume-hrc
Active Contributor
0 Likes
1,231

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
939

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

6 REPLIES 6
Read only

Former Member
0 Likes
940

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

Read only

0 Likes
939

Hi,

I called FM 'DYNP_VALUES_UPDATE' in addition to populating the select-options in a LOOP.

Best regards,

Guillaume

Read only

0 Likes
939

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.

Read only

0 Likes
939

Hi,

Found a new way (1,5 years after...) 

SET SCREEN 1000.

LEAVE SCREEN.

Best regards,

Guillaume

Read only

0 Likes
939

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.

Read only

0 Likes
939

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