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 w/out reference table-field

Former Member
5,634

Hi,

I have a select-option in the selection-screen where the values will be stored as fixed values under "Value range" of the domain. My problem here is that the reference table was not given. If i will use the select-option syntax, it will give an error because the reference table is not specified. Do you have any way to solve this? Please help.

Thanks.

Hi,

I have a select-option in the selection-screen where the values will be stored as fixed values under "Value range" of the domain. My problem here is that the reference table was not given. If i will use the select-option syntax, it will give an error because the reference table is not specified. Do you have any way to solve this? Please help.

Thanks.

4 REPLIES 4
Read only

Former Member
4,149

Hi,

Here i have used domain 'MATNR' which has a value table 'MARA'.

REPORT  YSAT_TEST2.
data: lv_matnr type matnr.
select-options: s_matnr for lv_matnr.

Read only

Former Member
0 Likes
4,149

data: a type vbeln.

select-options: s_vbeln for a.

Read only

Sougata
Active Contributor
0 Likes
4,149

Hello Akira,

Yes, it is very simple - please follow the code below:


"Let's say Z_DOMAIN is your domain which has a number of fixed values...so please create a Data 
"Element say Z_DATELEM which has Z_DOMAIN as the domain....

TYPES: ty_mytype TYPE z_datelem.

DATA: gv_mydata TYPE ty_mytype.

SELECT-OPTIONS: so_myso FOR gv_mydata.

And that's it! It should solve your problem now.

Cheers,

Sougata.

Read only

Former Member
0 Likes
4,149

Hi Akira,

You can refer the select options to the data element which have the domain with fixed value.

Please try this code --

SELECT-OPTIONS : s_carr for s_carr_id.

In the above example s_carr_id is the data element.

Regards

Pinaki