2007 Jan 25 8:10 AM
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.......
2007 Jan 25 8:15 AM
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
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
2007 Jan 25 8:13 AM
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
2007 Jan 25 8:15 AM
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
2007 Jan 25 8:16 AM
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
2007 Jan 25 8:31 AM
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.
2007 Feb 15 6:27 AM
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.
2007 Feb 15 6:57 AM
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
2007 Feb 15 7:38 AM
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
2007 Apr 30 8:12 PM
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |