‎2006 Jul 21 10:25 PM
HI Folks,
i have a internal table having 2 fields and 10 reocrds, ineed to find out the records which are starting with digit 9 only, please let me know how can i go with that.
i traid with '9%' it is giving dump.
plz help.
Thanks,
Ritesh
‎2006 Jul 21 10:29 PM
Hi,
check this :
if your internal table is i_tab and fields are fld1 and fld2 ...
loop at i_tab into wa_tab.
if wa_tab-fld1+0(1) = '9'.
append wa_tab to i_tab2.
endif.
endloop.
i_tab2 will have required records
regards
Appana
‎2006 Jul 21 10:29 PM
Hi,
check this :
if your internal table is i_tab and fields are fld1 and fld2 ...
loop at i_tab into wa_tab.
if wa_tab-fld1+0(1) = '9'.
append wa_tab to i_tab2.
endif.
endloop.
i_tab2 will have required records
regards
Appana
‎2006 Jul 21 10:29 PM
‎2006 Jul 21 10:32 PM
hi
you cant use '9%' as itz not permitted in itab context.
you need to perform the validation manually..
loop at itab.
if itab+0(1) eq '9'.
<perform your validations>.
endif.
endloop.
Cheers,
Abdul Hakim
‎2006 Jul 21 10:33 PM
Hi Ritesh,
Try this:
loop at itab where field+0(1) = '9'.
write: / itab.
endloop.
I've test on 4.7 and works fine.
Emmanuele Prudenzano
‎2006 Jul 21 10:37 PM
Hi,
put this code-
loop at <itab>
if <itab>-field(1) = '9'.
endif.
endloop.
regards,
‎2006 Jul 21 10:38 PM
Hi,
put this code-
loop at <itab>
if <itab>-field(1) = '9'.
endif.
endloop.
regards,
‎2006 Jul 22 9:52 AM
hi,
in ABAP/4 we have parameters,select-options for the selection,
try to get acquainted with these,those are very useful,
parameters field-name like tablename-fieldname.
parameters carrid like sflight-carrid.
best of luck,
regards,
kcc