2008 Apr 04 10:29 AM
hi all,
I am using abap program ,
in this program i want to search one string in to another string.
"How to Find a String in another String"
wether abap is having some functionality? pls send me the details about it?
thanks !
regards
Raghvendra
2008 Apr 04 10:33 AM
hi all,
I am using abap program ,
in this program i want to search one string in to another string.
"How to Find a String in another String"
wether abap is having some functionality? pls send me the details about it?
thanks !
regards
Raghvendra
2008 Apr 04 10:31 AM
Hi,
You can use CS comparison operator for that or SEARCH statement.
Check the documentation on those keywords.
Regards,
Nicolas
2008 Apr 04 10:33 AM
2008 Apr 04 10:36 AM
hi,
you can use a RANGE too.
it's work for a field or an internal table.
DATA: BEGIN OF rtab OCCURS {10|n},
sign(1) TYPE c,
option(2) TYPE c,
low LIKE dobj,
high LIKE dobj,
END OF sel.
Regards,
Reward point if useful.
2008 Apr 04 10:40 AM
Hi,
Find out the positiomn of ur string in the orginal string in sy-fdpos
DATA: text TYPE string VALUE 'Roll. .over Beethoven',
pos TYPE i.
SEARCH text FOR 'ol'.
SEARCH text FOR ` `.
IF sy-subrc = 0.
pos = sy-fdpos + 2.
SEARCH text FOR 'th' STARTING AT pos.
ENDIF.
do reward if helpful
2008 Apr 04 10:43 AM
hi,
try this short example:
DATA: BEGIN OF REPORT OCCURS 0,
TEXT(255),
END OF REPORT.
*
DATA: PRG LIKE SY-REPID.
PRG = SY-REPID.
*
READ REPORT PRG INTO REPORT.
*
LOOP AT REPORT.
*
SEARCH REPORT-TEXT FOR 'LOOP'.
*
IF SY-SUBRC = 0.
WRITE: / SY-TABIX, SY-FDPOS, REPORT-TEXT(60).
ENDIF.
*
ENDLOOP.
Regards, Dieter
2008 Apr 04 11:06 AM
hey ..
try out this code ..
lv_string = 'Hello World'.
FIND 'o' IN lv_string. "sets sy-subrc to 0 if 'o' was found, or 4 otherwiseif useful , Reward
thanks and regards.
Anoop Gupta
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |