Application Development 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: 

select statement

Former Member
0 Kudos

hi,

in the select option, the value to be entered is partly the size of the value in the field. for example BXGF0123456789PPX. user enter in the select option is 0123456789. may i know how in the select statement i can write.

user enter in select option s_fieldA is 0123456789 whereas in table this field is stored as BXGF0123456789PPX.

can i write like this?

select fieldA where fieldA+3(10) in s_fieldA

thanks

6 REPLIES 6

Former Member
0 Kudos

if ur r sure that it will apper inthat fixed length then u can write like that.

regards,

bharat.

Former Member
0 Kudos

Hi,

fetch the data from table into ITAB without considering this selection screen field in where cond, declare another field of type similar to selection screen field in the Itab.

Then

Loop at itab.

new field = BXGF0123456789PPX+4(10).

modify Itab index sy-tabix.

endloop

delete itab where <new field> not in S_fielda.

this will work.

regards,

Anji

Former Member
0 Kudos

if it is parameter or it is sinlgle value

then you try

data : patt(10) type c.

concatenate '%' s_op-low '%' into patt.

select * from dbtab where field like patt.

but pattern is only working for single value not for range...

regards

shiba dutta

Former Member
0 Kudos

Hi el,

Yes, you can.There is also one more way to do the same.

That is, go to that particular field domain, and put CONVERSION ROUTINE.

In That, CONVERSION_EXIT_DOMAIN_NAME_OUTPUT

CONVERSION_EXIT_DOMAIN_NAME_INPUT and

in CONVERSION_EXIT_DOMAIN_NAME_OUTPUT FM you can write your code.

In which way the field value to be stored.

Reward,if helps.

Regards,

V.Raghavender.

Former Member
0 Kudos

Hi el,

while writing there an string comparision operator is there.

where field1 CP '012345678'.

Former Member
0 Kudos

hii

you cannot directly write where fieldA+3(10) in s_fieldA

but you can write

temp = fieldA+3(10) .

............... where temp in s_fieldA