Inputparametre:
- TABLE (general table with header line)
- FIELDNAME (Name of field that shoul be searched incl. name of table)
- SEARCH (Teaxt that should be searched for
- RESULT (The text from field tht has been found)
- RESULT_INDEX (Record number. 0, if not found)
field-symbols: <f>
data: txt(500) type c.
assign (FIELDNAME) to <f>.
clear RESULT_INDEX.
translate SEARCH to upper case.
loop at TABLE.
move <f> to txt.
translate txt to upper case.
if <f> cs SEARCH.
move <f> to RESULT.
move sy-tabix to RESULT_INDEX.
exit.
endif.
endloop
No comments:
Post a Comment