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

About select option

Former Member
0 Likes
508

Hi experts,

In my alv report there is one field SERNR serial number, for this i have to put select option. My problem is this field doesn't exist in the table(Zmanifest) from where i'm fetching data. So i'm not able to mention this select option in my select query for that particular table. This field is existing in EQUI table and have no relation defined between zmanifest table & EQUI.

In my internal table i have all fields of zmanifest & this sernr; to fulfill this field logic is

Serial Number is combination of P_PREFIX-(dash)P_SERIAL fields in zmanifest. I have fetch all data including SERNR by above logic at my grid; but facing problem in defining SELECT-OPTIONS for Sernr.

Please help.

Points Sure.

Anshuman

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
487

Hi,

do like this.

take the lenght of P_PREFIX

take the lenght of P_SERIAL

add the length.

for exmaple :

P_PREFIX size is 4.

P_SERIAL size is 10

now declare the variable like this.

data : v_selop(15).

Note : 4101 = 15, so i declared the variable with lenght of 15.

select-options : so_field for v_selop.

regards

Sandeep Reddy

Edited by: Sandeep Reddy on May 16, 2008 7:17 PM

Hi experts,

In my alv report there is one field SERNR serial number, for this i have to put select option. My problem is this field doesn't exist in the table(Zmanifest) from where i'm fetching data. So i'm not able to mention this select option in my select query for that particular table. This field is existing in EQUI table and have no relation defined between zmanifest table & EQUI.

In my internal table i have all fields of zmanifest & this sernr; to fulfill this field logic is

Serial Number is combination of P_PREFIX-(dash)P_SERIAL fields in zmanifest. I have fetch all data including SERNR by above logic at my grid; but facing problem in defining SELECT-OPTIONS for Sernr.

Please help.

Points Sure.

Anshuman

3 REPLIES 3
Read only

Former Member
0 Likes
487

Hi,

Can you give the code.

Not clear with ur requirement.

Regards

Sandeep Reddy

Read only

Former Member
0 Likes
488

Hi,

do like this.

take the lenght of P_PREFIX

take the lenght of P_SERIAL

add the length.

for exmaple :

P_PREFIX size is 4.

P_SERIAL size is 10

now declare the variable like this.

data : v_selop(15).

Note : 4101 = 15, so i declared the variable with lenght of 15.

select-options : so_field for v_selop.

regards

Sandeep Reddy

Edited by: Sandeep Reddy on May 16, 2008 7:17 PM

Read only

Former Member
0 Likes
487

Hi,

{

do like this.

take the lenght of P_PREFIX

take the lenght of P_SERIAL

add the length.

for exmaple :

P_PREFIX size is 4.

P_SERIAL size is 10

now declare the variable like this.

data : v_selop(15).

Note : 4101 = 15, so i declared the variable with lenght of 15.

select-options : so_field for v_selop.

}

now use off-set in your select query like this:

*

where PREFIX = v_selop+0(4)

and SERIAL = v_selop+5(10)

it will work if you are using variable v_selop as a parameter else if you are using select option you have to break v_selop into two different select option like this:

s_prefix type prefix,

s_serial type serial.

loop at v_selop.

s_prefix-* = v_selop-. " ( = sign, option)

s_serial-* = v_selop-*.

s_prefix-low = v_selop-low+0(4).

s_serial-low = v_selop-low+5(10).

s_prefix-high = v_selop-high+0(4).

s_serial-high = v_selop-high+5(10).

endloop.

now use following select query

*

where PREFIX in s_prefix

and SERIAL in s_serial.

it will surely wrok.

--

Regards-

Gagan Kumar

Plz Reward if need full. also close the question.

Edited by: Gagan Kumar on May 18, 2008 7:30 PM