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

Excluding data from the selection screen

Former Member
0 Likes
3,570

Hi friends,

I have an issue like , I am reading the datas from server and i am using open dataset and read data set for reading the same..I have all my datas in my internal table..But now i need to exclude certain values which i give in selection screen as multiple values..For single values its excluding but when i give multiple values its taking only the low range.values to be excluded..

Could any one tell me wats that i need to do for reading multiple values

Thanks in advance

kishore

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,395

To exclude more than one value using range you need to pass all in lower option.

you will not be able to convert these individual values to interval.

15 REPLIES 15
Read only

Former Member
0 Likes
2,395

Hi,

Please paste the code how you are excluding single values... will modify it and give it...

Regards,

Siddarth

Read only

0 Likes
2,395

loop at outtab where zadpbatch ne s_batch-low.

"

Endloop

This is the loop where i am giving the criteria..But its takin only low values and not high values..even when i didn give low also its taking only low values

Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
2,395

When you give both low and high valuesin select option it beahves like a range .

So you can loop at this select option.

read itab.

delete if found.

Read only

Former Member
0 Likes
2,395

Hi,

Let u have KUNNR in selection screen and u r getting data of customers form AL11 (to a table AL11_TABLE).

then get all Kunnrs from base table (For KUNNR it is KNA1) to a internal tabl ITAB.

sort AL11_TABLE by KUNNR.

Loop at ITAB.

delete AL11_Table where kunnr = ITAB-KUNNR.

Endloop.

Kiran.....

Edited by: kiran vempati on May 6, 2009 11:48 AM

Read only

Former Member
0 Likes
2,395

if s_data is field on the selection screen, u can use:

if v_data not in s_data .

delete............

endif.

Read only

Former Member
0 Likes
2,396

To exclude more than one value using range you need to pass all in lower option.

you will not be able to convert these individual values to interval.

Read only

0 Likes
2,395

Hi,

modify the code as given below.... This will resolve your issue for sure

loop at outtab where not zadpbatch in s_batch.
"

Endloop

Regards,

Siddarth

Read only

0 Likes
2,395

how can i pass all the values in low itself i just wanna know because when i give multiple values for selection its taking only the first as low others its leaving that

Read only

0 Likes
2,395

Thats perfectly correct for select option.

In the very beginning i mentioned to create range table and your porblem is solved.

Read only

0 Likes
2,395

Hi Kishore,

Did you try the solution which I have given in the earlier post... this will work for sure...

loop at outtab where not zadpbatch in s_batch.
"
 
Endloop

Regards,

Siddarth

Read only

0 Likes
2,395

i tried the one u have given, Its excluding multiple values but wat happens is like when i didn give any criteria in select option its not displaying anything..

I want the thing like wat ever i give in select option that should be excluded but if i ddin specify any values in select option then it should show everthing which is not happening in this case help me to solve this also

Thanks

kishore

Read only

0 Likes
2,395

its pretty simple.....

if s_batch is not initial.
loop at outtab where not zadpbatch in s_batch.
"
Endloop
else.
loop at outtab.
"
Endloop
endif.

Hope this resolves your issue....

Regards,

Siddarth

Read only

0 Likes
2,395

Hi Kishore,

Just check this:

Suppose your internal table ITAB is having 2 fields:

VBELN KUNNR.

Selection screen field = s_kunnr.

internal variable = i_tabix like sy-tabix.

The coding will be:

IF S_KUNNR IS NOT INITIAL.

LOOP AT ITAB.

i_tabix = sy-tabix.

IF ITAB-KUNNR IN S_KUNNR.

DELETE ITAB INDEX I_TABIX.

ENDIF.

ENDLOOP.

ENDIF.

Regards,

Vishal

Read only

0 Likes
2,395

Thanks for ur valuable answer. I solved the problem Urs option is working but i tried by If conidtion that too worked..For performance i chose that . ANyways thanks a lot to everyone who helped me in this issue.

Thanks

kishore

Read only

Former Member
0 Likes
2,395

Hi Kishore,

Just check this:

Suppose your internal table ITAB is having 2 fields:

VBELN KUNNR.

Selection screen field = s_kunnr.

internal variable = i_tabix like sy-tabix.

The coding will be:

LOOP AT ITAB.

i_tabix = sy-tabix.

IF ITAB-KUNNR IN S_KUNNR.

DELETE ITAB INDEX I_TABIX.

ENDIF.

ENDLOOP.

Regards,

Vishal