2009 May 06 10:39 AM
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
2009 May 06 10:51 AM
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.
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.
2009 May 06 10:43 AM
Hi,
Please paste the code how you are excluding single values... will modify it and give it...
Regards,
Siddarth
2009 May 06 10:50 AM
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
2009 May 06 10:43 AM
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.
2009 May 06 10:47 AM
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
2009 May 06 10:49 AM
if s_data is field on the selection screen, u can use:
if v_data not in s_data .
delete............
endif.
2009 May 06 10:51 AM
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.
2009 May 06 10:52 AM
Hi,
modify the code as given below.... This will resolve your issue for sure
loop at outtab where not zadpbatch in s_batch.
"
EndloopRegards,
Siddarth
2009 May 06 10:54 AM
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
2009 May 06 10:57 AM
Thats perfectly correct for select option.
In the very beginning i mentioned to create range table and your porblem is solved.
2009 May 06 11:02 AM
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.
"
EndloopRegards,
Siddarth
2009 May 06 11:22 AM
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
2009 May 06 11:25 AM
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
2009 May 06 11:28 AM
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
2009 May 06 11:52 AM
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
2009 May 06 10:53 AM
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
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |