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: 

help need in selection query

Former Member
0 Kudos
122

Hi ,

I have a field(test) in ztable(zxxx) whose length is 12 char and while updating it

only 10 digits were updated and there are no zeros in front of the value in order to make it

12 digit.

Now i need this parameter to be included in another program selection screen.

Now i have given it as

parameter : test(12) type n.

it works fine when it has an entry , when it is blank i has to retrieve all records but in this case

i won't because it has a value of 000000000000

noe when i declare like this

paramter : test like zxxx-test.

when my input is 123456, it won't fetch me any value because it has to be 0000123456 because it has been updated like in the table.

There was a purpose in updating this way.

Now my code is like this

parameters : test(10) type n.

select-options : kostl for zxxx-kostl NO-EXTENSION NO INTERVALS,

p_uname for zxxx-uname NO-EXTENSION NO INTERVALS.

if test is initial.

select * from zxxx into table itab where kostl in kostl and uname in p_uname.

else.

select * from zxxx into table itab where aufnr = order and

kostl in kostl and uname in p_uname.

endif

PLEASE SUGGEST ME IF THERE IS AN ALTERNATE BETTER WAY.

or this is the best way

Thanks

4 REPLIES 4

Former Member
0 Kudos
84

if you need to select all records in case if you do not provide any value in your selection criteria - the parameter is not going to work here and your approach with NO-Extension No Intervals is the right one.

0 Kudos
84

Hi

as per my knowledge what you have done is right.

Thanks

KAJOL

0 Kudos
84

Hi

any thoughts on this.

Thanks

0 Kudos
84

Hi deepthi,

iam sorry . It was intended to my post .

Thanks