10-17-2007 12:55 PM
Hi ,
i am having an internal table with a field. That field contains digits alone, aphabets alone, and values with decimal places.
I want to check if that field contains any alphabet letters i want to delete that.
can anyone explain me with an example.
I tried
itab-field CA 'abcdefghijklmnopqrstuvwxyz'.
delete itab index sy-tabix.
But it is not deleting. It is checking for the whole alphabets. I want to delete if it contacins anyone of the alphabet from a to z.
Please help me on this.
regards,
Phyrose.
10-17-2007 12:57 PM
use sy-abcde
loop at itab.
if itab-field CA sy-abcde.
delete itab index sy-tabix.
endif.
endloop.
10-17-2007 12:57 PM
look at command regex for finding patterns
see
https://forums.sdn.sap.com/click.jspa?searchID=6000474&messageID=4059829
kind regards
arthur
Message was edited by:
A. de Smidt
10-17-2007 12:59 PM
hi Camila,
pls. try:
IFitab-field CN '0123456789.'.
==>delete is done here
ENDIF.
this is the opposite (pls. note that dot stands for the decimal point, canbe coma as well)
on the other hand I think what you wrote you have to change to capitals:
CA 'ABCD....etc.
hope this helps
ec
10-17-2007 1:00 PM
create a range for A to Z alphabets...
(both small and capital)
in ITAB loop....
check if that itab field containg any aplhabet in this range...
then delete the record from itab...