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

Regarding select-options

Former Member
0 Likes
651

hi

if we write select-options in program we have to include 'tables' work area with tables keyword. if we write parameters stmt no need to include. why?

7 REPLIES 7
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
627

Hi,

Parameters can contain only one value at a time whereas select-option is basically an table format with ( sign,option, low and high values) so to access all these values we need tables statement.

*reward if helps.

Read only

Former Member
0 Likes
627

Hi,

For select-options also you don't require a TABLES statement..

Check this example..



DATA: V_MATNR TYPE MATNR.

SELECT-OPTIONS: SO_MATNR FOR V_MATNR.

Thanks

Naren

Read only

Former Member
0 Likes
627

Hi,

This is because select-options is itself a table having the fields sign,option,low and high.

But parameters is just a variable which accepts input values from the user.

Hope it is useful.

Thanks,

Sandeep.

Read only

Former Member
0 Likes
627

hi,

in parameter itslef we r defyning that(table name) with <b>type</b> or <b>like</b> keyword.

ex:PARAMETERS p_plant LIKE marc-werks.

or

PARAMETERS p_loc type c.

reward points if useful,

seshu.

Read only

Former Member
0 Likes
627

Jyothsna,

Parameter can contain only one value.But Select-option is like internal table.It has to hold lot of data.For that it needs work area.

Don't forget to reward if useful....

Read only

Former Member
0 Likes
627

Jyothsna,

Parameter can contain only one value.But Select-option is like internal table.It has to hold lot of data.For that it needs work area.

Don't forget to reward if useful....

Read only

Former Member
0 Likes
627

Hi Jyothsna,

A parameter is interpreted as a variable so you can declare it as a type i / type c also.

This is absolute declaration.

A select options' is as an internal table, so you have to declare it FOR a previously declared type.

There cannot be a select options of type c.

This is relative declaration.

Regs,

Sameer