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

select-option:

Former Member
0 Likes
938

select-option is an selection table containing 4 standard fields

SIGN, OPTION, LOW, HIGH.

can anyone tell me a sample code for the following DOUBT.

I need(fetch) data for 20 records. i.e, 1 to 20.

but i don't need 15, 16 th records. (excluding these both) i.e, 1-14 and 17-20.

(not using WRITE st/m.)

using select-option st/m, and its fields. can u solve my problem.

( In Initialisation we hav to code it.)

it's an interview question. help me pl.......

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
861

Hi Ajay

Check this:

tables: mara.

select-options: s_matnr for mara-matnr.

initialization.

   s_matnr-sign = 'I'.
   s_matnr-option = 'BT'.
   s_matnr-low = '1'.
   s_matnr-high = '20'.
   append s_matnr.

   s_matnr-sign = 'E'.
   s_matnr-option = 'BT'.
   s_matnr-low = '15'.
   s_matnr-high = '16'.
   append s_matnr.

Regards

Eswar

8 REPLIES 8
Read only

Former Member
0 Likes
861

hi


select-options: abc for tab-abc.

abc-sign = 'I'.
abc-option = 'BT'.
abc-low = 1.
abc-high = 14.
append abc.

abc-sign = 'I'.
abc-option = 'BT'.
abc-low = 17.
abc-high = 20.

thx

pavan

Read only

Former Member
0 Likes
862

Hi Ajay

Check this:

tables: mara.

select-options: s_matnr for mara-matnr.

initialization.

   s_matnr-sign = 'I'.
   s_matnr-option = 'BT'.
   s_matnr-low = '1'.
   s_matnr-high = '20'.
   append s_matnr.

   s_matnr-sign = 'E'.
   s_matnr-option = 'BT'.
   s_matnr-low = '15'.
   s_matnr-high = '16'.
   append s_matnr.

Regards

Eswar

Read only

Former Member
0 Likes
861

Hi

SELECT-OPTIONS: SO_SEL FOR ....

INITIALIZATION.

SO_SEL-SIGN = 'I'.

SO_SEL-OPTION = 'BT'.

SO_SEL-LOW = '1'.

SO_SEL-HIGH = '14'.

APPEND SO_SEL.

SO_SEL-LOW = '17'.

SO_SEL-HIGH = '20'.

APPEND SO_SEL.

Max

Read only

Former Member
0 Likes
861

use the multiple selection button in the select-option output.

tables : spfli.

data : it_spfli like table of spfli with header line.

SELECT-OPTIONS: car for spfli-carrid.

select * from spfli into table it_spfli where carrid in car.

the coding is same while executing the program select the multile selection button.

U will get a table control screen .

select the multiple selection button a search help opens tick the check box upto 14 records & then from 17th to 20 & click execute button.

Read only

Former Member
0 Likes
861

ex:

SELECT-OPTIONS:

s_bukrs FOR fti_int_instr_selscr_items-company_code.

On the selection screen , if values 15 and 16 are excluded in the exclude tab then they wont appear in selection.

Read only

Former Member
0 Likes
861

HI,

Simplest way,

Fetch all the 20 records from a select query into an internal table.

Then, delete itab from 15 to 16.

This will infact improve performance and the index number can be passed dynamically also.

Regards

Subramanian

Read only

Former Member
0 Likes
861

Hi,

try this:

***********************************************************

SELECTION-SCREEN BEGIN OF BLOCK name

SELECT-OPTIONS

x FOR dataelement

SELECTION-SCREEN END OF BLOCK name

***********************************************************

START-OF-SELECTION

lr_name = x

SELECT *

FROM your_database

INTO TABLE itab

WHERE y IN lr_name

LOOP AT itab INTO wa

IF wa-y NE 15 OR wa-y NE 16

APPEND wa TO itab_2

ENDIF

ENDLOOP

CLEAR itab

itab = itab_2

Read only

Former Member
0 Likes
861

thanks to all for helping me solving my problem....