Application Development 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: 

How to get popup window to select Operators

Former Member
0 Kudos

Hi all,

I need to generate popup screen where i can select operators. Such EQ(=), GT(>), LT(<), GE(>=), LE(=<) etc.

Is their any function module to get the same or how can i achive this.

5 REPLIES 5

Former Member
0 Kudos

use RS_values_box

CLEAR : WA_FIELD_DESC, FIELD_DESC.

WA_FIELD_DESC-FIELDNAME = 'NO'.

WA_FIELD_DESC-COL_HEAD = 'NO'.

WA_FIELD_DESC-FIELDNUM = 1.

WA_FIELD_DESC-DISPLAY = 'X'.

APPEND WA_FIELD_DESC TO FIELD_DESC.

WA_FIELD_DESC-FIELDNAME = 'OPERATION'.

WA_FIELD_DESC-COL_HEAD = 'OPERATION'.

WA_FIELD_DESC-FIELDNUM = 2.

WA_FIELD_DESC-DISPLAY = 'X'.

APPEND WA_FIELD_DESC TO FIELD_DESC.

wa_operation-NO = 1

wa_operation- OPERATION = u2018+u2019

append wa_operation to IT_DISP_OPERATION.

wa_operation-NO = 2

wa_operation- OPERATION = u2018-u2019

append wa_operation to IT_DISP_OPERATION.

wa_operation-NO = 3

wa_operation- OPERATION = u2018*u2019

append wa_operation to IT_DISP_OPERATION.

wa_operation-NO = 4

wa_operation- OPERATION = u2018/u2019

append wa_operation to IT_DISP_OPERATION.

L_NR = 0.

CALL FUNCTION 'RS_VALUES_BOX'

EXPORTING

COLUMN_HEADING = 'X'

LEFT_UPPER_COL = 5

LEFT_UPPER_ROW = 5

PAGESIZE = 100

TITLE = 'Select Re-Print operations'(SDC)

IMPORTING

LINENUMBER = L_NR

TABLES

FIELD_DESC = FIELD_DESC

VALUE_TAB = IT_DISP_OPERATION

EXCEPTIONS

OTHERS = 1.

IF SY-SUBRC EQ 0 AND L_NR NE 0.

READ TABLE IT_DISP_OPERATION INTO WA_DISP_OPERATION INDEX L_NR.

IO_OPERATION = WA_DISP_OPERATION-OPERATION.

ELSE.

LEAVE PROGRAM.

ENDIF.

0 Kudos

Could you please tell me value table declarations.

In Fm i am not finding its type.

0 Kudos

HI,

Check this FM

Function module              SELECT_OPTION_OPTIONS

  Import parameters               Value
  SELCTEXT                        TEXT
*  SIGN
*  OPTION
  JUST_DISPLAY                    X
 * SIGNS_RESTRICTION
  OPTION_LIST                         XXXXXX XX
  NO_DEL_LINE                     X
  Export parameters               Value
  SIGN
  OPTION

0 Kudos

Hi

if u execute se16 with table name.

On tool bar u can see button with 3 leafs(selection options ). If u click u will receive list of operators to choose.

I need to display and get the operator choosen.

0 Kudos

Hi,

Check this OPTION_LIST parameter in the FM

The Following are the field in the OPTION_LIST you need to pass the X to corresponding field so that this will be displayed in the Popup

BT
CP
EQ X
GE X
GT X
LE X
LT X
NB 
NE X
NP

Function module              SELECT_OPTION_OPTIONS
 
  Import parameters               Value
  SELCTEXT                        TEXT
*  SIGN
*  OPTION
  JUST_DISPLAY                    X
 * SIGNS_RESTRICTION
  OPTION_LIST                         XXXXXX X
  NO_DEL_LINE                     X
  Export parameters               Value
  SIGN                                     " The selected sign will be displyed I / E
  OPTION                                 " The selected option is displayed here