2006 Jul 05 10:09 AM
Hi
During upgrade to WAS 7.0 I have to convert a SEARCH command to a FIND command.
int_edidd is a standard tabel.
Old:
SEARCH int_edidd FOR 'E1EDK04'.
New:
DATA: l_segment TYPE STRING VALUE 'E1EDK04'.
FIND FIRST OCCURRENCE OF l_segment IN TABLE int_edidd
MATCH LINE sy-tabix.
Syntax error:
Als Zeilentyp der Tabelle "INT_EDIDD" wurde im CHAR MODE ein zeichenartiges bzw. im BYTE MODE ein byteartiges Feld erwartet.
What is wrong ? Is it a unicode problem ?
best regards
Thomas Madsen Nielsen
Hi
During upgrade to WAS 7.0 I have to convert a SEARCH command to a FIND command.
int_edidd is a standard tabel.
Old:
SEARCH int_edidd FOR 'E1EDK04'.
New:
DATA: l_segment TYPE STRING VALUE 'E1EDK04'.
FIND FIRST OCCURRENCE OF l_segment IN TABLE int_edidd
MATCH LINE sy-tabix.
Syntax error:
Als Zeilentyp der Tabelle "INT_EDIDD" wurde im CHAR MODE ein zeichenartiges bzw. im BYTE MODE ein byteartiges Feld erwartet.
What is wrong ? Is it a unicode problem ?
best regards
Thomas Madsen Nielsen
2006 Jul 05 10:13 AM
I think we cannot use the addition FIRST OCCURENCE with FIND. It can be used with REPLACE.
-Kiran
2006 Jul 05 10:36 AM
Thanks Kiran
but no - thats not it.
according to documentation the syntax include FIRST OCCURENCE:
FIND [{FIRST OCCURRENCE}|{ALL OCCURRENCES} OF] pattern
IN TABLE itab [table_range]
[IN {BYTE|CHARACTER} MODE]
[{RESPECTING|IGNORING} CASE]
[MATCH COUNT mcnt]
{ {[MATCH LINE mlin]
[MATCH OFFSET moff]
[MATCH LENGTH mlen]}
| [RESULTS result_tab|result_wa] }
[SUBMATCHES s1 s2 ...].
2006 Jul 05 10:16 AM
Can you check with:
DATA: l_segment(7) TYPE C VALUE 'E1EDK04'.rgds,
TM
2006 Jul 05 10:39 AM
Thanks TM
but your solution doesn't work.
Example from documentation using string type
:
DATA: patt TYPE string VALUE `now`,
text TYPE string,
result_tab TYPE match_result_tab.
FIELD-SYMBOLS <match> LIKE LINE OF result_tab.
FIND ALL OCCURRENCES OF patt IN
`Everybody knows this is nowhere`
RESULTS result_tab.
LOOP AT result_tab ASSIGNING <match>.
WRITE: / <match>-offset, <match>-length.
ENDLOOP.
Best regards
Thomas Madsen Nielsen
2006 Jul 05 10:43 AM
I translated the error message from German to English in Google.
The English version of the error is
"As line type of the table INT_EDIDD in the CHAR MODE a indication-like and/or in the BYTE MODE a byte-like field was expected. "
Might Help...
-Kiran
2006 Jul 05 10:50 AM
hi,
DATA: text TYPE STRING.
text = 'Everyone knows this'.
FIND 'know' IN text.
if sy-subrc = 0.
write:/ 'found'.
endif.
Regards,
Manohar.
2006 Jul 05 10:54 AM
Hi Manohar
Thanks for your reply.
However, i'm not looking for the syntax to search in a text string.
I'm looking for the syntax to search in a table.
best regards
Thomas Madsen Nielsen
2015 Mar 18 10:42 AM
Hi Thomas,
was there any solution for u... i have the same requirement...
--Bernward
2015 Mar 18 10:47 AM