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

Regd: Select Options..

former_member182354
Contributor
0 Likes
603

Hi abap gurus

I have a requirement where I have to use an Select Option and the selection can be single or a range how can I do that ??

Urgent plzz

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
576

it is a normal select-options where the user is free to give either single value or in range.

e.g.

tables lfa1.

select-options lifnr for lfa1-lifnr.

regards,

pankaj singh

5 REPLIES 5
Read only

Former Member
0 Likes
577

it is a normal select-options where the user is free to give either single value or in range.

e.g.

tables lfa1.

select-options lifnr for lfa1-lifnr.

regards,

pankaj singh

Read only

Former Member
0 Likes
576

Hi!


SELECT-OPTIONS: s_datum FOR sy-datum.   "most common
SELECT-OPTIONS: s_datum FOR sy-datum NO-EXTENSION.   "like a parameter

Usage:
SELECT * 
  FROM mkpf
  INTO TABLE gt_mkpf
  WHERE budat IN s_datum.

Regards

Tamá

Read only

Former Member
0 Likes
576

Hi dude,

You can use select option in a way depicted below -


TABLES: pa0000.

DATA: BEGIN OF gt_pernr OCCURS 0,
        pernr                TYPE pa0000-pernr,
      END OF gt_pernr.

SELECT-OPTIONS: s_pernr      FOR  pa0000-pernr,

START-OF-SELECTION.
* FETCH PERNRs
  SELECT pernr
  INTO TABLE gt_pernr
  FROM pa0000
  WHERE pernr IN s_pernr.

System will take care of both single and multiple selection.

Regards,

Manish Joshi.

Read only

Former Member
0 Likes
576

if u want to have a range ur a single value use

tables : tablename.

select-options lvariable name for tabname-field.

otherways of using it our

select-options lvariable name for tabname-field no interval. for without range

select-options lvariable name for tabname-field no extension for with range and only one value in both inpute

select-options lvariable name for tabname-field no extension no interval for a parameter

regards

navjot

reward for helpfull answers

Read only

Former Member
0 Likes
576

Hi Raghavender,

Just go thru the systax of SELECT OPTIONS

SELECT-OPTIONS: selectioncriteria FOR dataobject.

This will allow you make either single or multiple selections

If u r still not clear just enter 'SELECT OPTION' in ABAP editor and then click on 'F1' for detailed documentation

Regards

sowmya