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: 

incrementing select-option value

Former Member
0 Kudos

hai all

how can i increment select-option-low value to display multiple records

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi goutam,

you got many possible answers. but if you can specify what exactly is your requirement then we can provide the exact answer for you

thank you.

8 REPLIES 8

vimalv
Active Participant
0 Kudos

Hi Goutam,

Select-option is basically a range.

Use a work area like the range, append values to it as shown below :



select-options : s_kunnr for kna1-kunnr.

DATA :  r_kunnr type range of kunnr,
              w_range like r_kunnr. 


w_range-sign = 'I'.
w_range-option = 'EQ'.
w_range-low = '1231231'.
append w_range to s_kunnr[].

similiearly you can also do like this :


            select-options : s_kunnr for kna1-kunnr.

            s_kunnr-sign = 'I'.
            s_kunnr-option = 'EQ'.
            s_kunnr-low = '12312312'.
           append s_kunnr.

hope that helps.

venkat_o
Active Contributor
0 Kudos

Hello, try this way

REPORT ztest_notepad.
TABLES:mara.
SELECT-OPTIONS s_matnr FOR mara-matnr.

INITIALIZATION.

  DO 10 TIMES.
    s_matnr-low  = 1 + sy-index.
    s_matnr-high = space.
    s_matnr-option = 'EQ'.
    s_matnr-sign  = 'I'.
    APPEND s_matnr.
    CLEAR  s_matnr.
  ENDDO.
Thanks Venkat.O

Former Member
0 Kudos

Hi,

You cannot increment the select-options value.

If you have got any values using select-options ( for example matnr ), then you have to select all the matnr values

from the mara table by passing the values of select-options and you have to loop at through the internal table.

Thanks and regards,

Venkat

Former Member
0 Kudos

Hi,

To display the range in select-option

Loop at z_s_matnr into z_wa_matnr

*z_wa_matnr-low will contain the value

endloop.

Former Member
0 Kudos

Hi,

You need not increment in the select-option manually..

Just specify as follows:

wa_range-sign = 'I'.

wa_range-option = 'BT'. <----


Specify this as between

wa_range-low = so-matnr-low.

append wa_range to s_matnr[].

This should solve your problem..

Former Member
0 Kudos

hi goutam,

you got many possible answers. but if you can specify what exactly is your requirement then we can provide the exact answer for you

thank you.

0 Kudos

OOP AT S_ERDAT .

CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'

EXPORTING

INPUT = S_ERDAT-LOW

IMPORTING

OUTPUT = VAR1.

S_ERDAT-HIGH = S_ERDAT-LOW + 1.

APPEND S_ERDAT.

TB_ITAB-VAR = VAR1.

APPEND TB_ITAB.

ENDLOOP.

In the above code i want to increase the s_erdat value and display all the records in list

but i am getting only a single record

0 Kudos

HI,

You can also use INITIALIZATION event where you can increment by

S_VALUE = S_VALUE + 1.