‎2007 May 11 10:05 AM
HI ,
1. its a scenario like this . i am fetching all the data in an internal table . i want to restrict the material number whose thirteenth number is 3 . how can i put the where condition .
2. one more thing is i have the data in an internal table . i want to delete the records for which material numbers starts with three .
please help me on this .
regards,
magesh
‎2007 May 11 10:26 AM
1. read table itab with key matnr = 13. or read table itab with key index = 13. [for internal table having a work area also]
itab-matnr =3.
modify itab index sy-tabix.
2.delete itab where itab-matnr = '3%' or '3_' [for internal tbale having same work area]
delete wa from itab where wa-matnr = '3%' or '3_' for internal table with explicit work area]
‎2007 May 11 10:09 AM
Hi
For ur
1: u can use matnr+13(18) = '3'
then perform ur operation.
2. matnr+0(18) = '3'
perform ur operation.
Regards,
Sreeram
‎2007 May 11 10:09 AM
‎2007 May 11 10:10 AM
Hi,
What u can do in both the cases is take the data in the internal table. then put the following code :
1. loop at itab.
if itab-matnr(13) = '3'.
delete itab index sy-tabix.
endif.
endloop.
2. loop at itab.
if itab-matnr(1) = '3'.
delete itab index sy-tabix.
endif.
endloop.
Hope this helps u.
Regards,
Himanshu
‎2007 May 11 10:10 AM
Hi
1) delete itab where matnr+12(1) ne '3'.
2) delete itab where matnr(1) eq '3'.
Thanks
Sandeep
‎2007 May 11 10:11 AM
'_' is an individual wildcard character, % is a wildcard.
1. where matnr like '----
3%'
2. delete where matnr like '3%'.
‎2007 May 11 10:15 AM
Hello Magesh
If you want to select via SAPGUI (dialog) you have to enter '+++++++++++3*' (12x '') into the selection field. '+' means exactly one character.
If you want to select directly from the DB table then you have to translate this into:
'____________3%' (12x '_' ).
Regards
Uwe
‎2007 May 11 10:16 AM
Hi
Do Like this...
1. itab-matnr+12(1) = '3'
Do your operation.
2. matnr+0(1) = '3'
Do your operation.
Reward All Helpfull Answers.....
‎2007 May 11 10:24 AM
1. its a scenario like this . i am fetching all the data in an internal table . i want to restrict the material number whose thirteenth number is 3 . how can i put the where condition .
2. one more thing is i have the data in an internal table . i want to delete the records for which material numbers starts with three .
please help me on this .
regards,
magesh
1. read table itab with key matnr = 13. or read table itab with key index = 13. [for internal table having a work area also]
itab-matnr =3.
modify itab index sy-tabix.
2.delete itab where itab-matnr = '3%' or '3_'
‎2007 May 11 10:26 AM
1. read table itab with key matnr = 13. or read table itab with key index = 13. [for internal table having a work area also]
itab-matnr =3.
modify itab index sy-tabix.
2.delete itab where itab-matnr = '3%' or '3_' [for internal tbale having same work area]
delete wa from itab where wa-matnr = '3%' or '3_' for internal table with explicit work area]
‎2007 May 11 10:35 AM
hii magesh,
use this code
delete itab where matnr+12(1) ne '3'.
delete itab where matnr(1) eq '3'.
reward if useful
vikaas