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

How to read select-option values

Former Member
0 Likes
1,988

Hi Experts

I have a requirement where in I need to provide F4 help for a parameter on selection screen for the entries in a select-option on the same screen. Here I need to get the value of select-option and based on that I need to provide f4 help. Please let me know if any one came across such scenario as to how we can read the values on the same screen.

Venkat

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
723

Hi,

Try with Function module: 'RS_REFRESH_FROM_SELECTOPTIONS'.

Kind Regards

Hi Experts

I have a requirement where in I need to provide F4 help for a parameter on selection screen for the entries in a select-option on the same screen. Here I need to get the value of select-option and based on that I need to provide f4 help. Please let me know if any one came across such scenario as to how we can read the values on the same screen.

Venkat

3 REPLIES 3
Read only

Former Member
0 Likes
723

Here's one I used


  CLEAR d_line.
  IF s_div IS INITIAL.
    d_line-fldname = fldname.
    d_line-sign = 'Include'.
    d_line-low  = 'All'.
    WRITE:/ d_line.
  ELSE.
    LOOP AT s_div.
      PERFORM display_selection_detail
        USING fldname s_div-sign s_div-option
                      s_div-low  s_div-high.
      CLEAR fldname.
    ENDLOOP.
  ENDIF.
*
*
*
*&---------------------------------------------------------------------*
*&      Form  display_selection_detail
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_FLDNAME  text
*      -->P_SIGN  text
*      -->P_OPTION  text
*      -->P_LOW  text
*      -->P_HIGH  text
*----------------------------------------------------------------------*
FORM display_selection_detail USING    p_fldname
                                       p_sign
                                       p_option
                                       p_low
                                       p_high.
  CLEAR d_line.

  d_line-fldname = p_fldname.
  CASE p_sign.
    WHEN 'I'.
      d_line-sign = 'Include'.
    WHEN 'E'.
      d_line-sign = 'Exclude'.
    WHEN OTHERS.
      d_line-sign = p_sign.
  ENDCASE.

  CASE p_option.
    WHEN 'EQ'.
      d_line-option = 'Equal'.
    WHEN 'NE'.
      d_line-option = 'Not Equal'.
    WHEN 'BT'.
      d_line-option = 'Between'.
    WHEN 'GE'.
      d_line-option = 'Great Than or Equal'.
    WHEN 'LE'.
      d_line-option = 'Less Than or Equal'.
    WHEN 'GT'.
      d_line-option = 'Great Than'.
    WHEN 'LT'.
      d_line-option = 'Less Than'.
    WHEN OTHERS.
      d_line-option = p_option.
  ENDCASE.

  d_line-low  = p_low.
  d_line-high  = p_high.
  WRITE:/ d_line.

ENDFORM.                    " display_selection_detail

Read only

Sm1tje
Active Contributor
0 Likes
723

loop at so.

if so-low = 'XXX'.

elseif so_low = 'YYY'.

endif.

endloop.

But remember, there can be a lot combinations of options for a select option SIGN and OPTION.

SIGN = 'I' => include

SIGN = 'E' => exclude

OPTION = 'BT' (between). LE (less equal), GE (greater equal) etc. So you will have to consider quite some options.

Read only

Former Member
0 Likes
724

Hi,

Try with Function module: 'RS_REFRESH_FROM_SELECTOPTIONS'.

Kind Regards