1DATA:STRING(30) VALUE'This is a fast first example.',2 POSTYPEI,3OFFTYPEI.4WRITE /STRING.5SEARCHSTRINGFOR'ft'ABBREVIATED.6WRITE: /'SY-FDPOS:', SY-FDPOS.7 POS = SY-FDPOS +2.8SEARCHSTRINGFOR'ft' ABBREVIATEDSTARTINGAT POSANDMARK.9WRITE /STRING.10WRITE: /'SY-FDPOS:', SY-FDPOS.11OFF...
REPLACE SECTION [OFFSET off] [LENGTH len] OF dobj WITH new [IN { BYTE | CHARACTER } MODE]. REPLACE [{FIRST OCCURRENCE}|{ALL OCCURRENCES} OF] [SUBSTRING] sub_string IN [SECTION [OFFSET off] [LENGTH len] OF ] dobj WITH new [IN {BYTE|CHARACTER} MODE] [{RESPECTING|IGNORING} CASE] ...
8 STRING = T. 9 WRITE STRING. 10 REPLACE STR1 WITH STR2 INTO STRING. 11 WRITE / STRING. 12 STRING = T. 13 REPLACE STR1 WITH STR2 INTO STRING LENGTH LEN. 14 WRITE / STRING. 15 STRING = T. 16 REPLACE STR1 WITH STR3 INTO STRING. 17 WRITE / STRING. 18 STRING = T. 19 REPLA...
two system variables are used. The first is “sy-subrc”, which identifies whether the search was successful or not, and the second is “sy-fdpos”, which, if the search is successful, is set to the position of the character string searched for insurname2. Below...
OF dobj WITH new [IN { BYTE | CHARACTER } MODE]. REPLACE [{FIRST OCCURRENCE}|{ALL OCCURRENCES} OF] [SUBSTRING] sub_string IN [SECTION [OFFSET off] [LENGTH len] OF ] dobj WITH new [IN {BYTE|CHARACTER} MODE] [{RESPECTING|IGNORING} CASE] ...
OF dobj WITH new [IN { BYTE | CHARACTER } MODE]. REPLACE [{FIRST OCCURRENCE}|{ALL OCCURRENCES} OF] [SUBSTRING] sub_string IN [SECTION [OFFSET off] [LENGTH len] OF ] dobj WITH new [IN {BYTE|CHARACTER} MODE] [{RESPECTING|IGNORING} CASE] ...
4. 字符串替换 REPLACE SECTION [OFFSET off] [LENGTH len] OF dobj WITH new [IN { BYTE | CHARACTER } MODE]. REPLACE [{FIRST OCCURRENCE}|{ALL OCCURRENCES} OF] [SUBSTRING] sub_string IN [SECTION [OFFSET off] [LENGTH len] OF ] dobj WITH new [IN {BYTE|CHARACTER} MODE] [{RESPECTING|...
Found location for operations with character-type fields.· If the operators CO, CN, CA, NA, CS, NS, CP, NP are used in comparisons, SY-FDPOS is assigned offset values depending on the comparison result.· SEARCH … FOR… sets SY-FDPOS to the offset of the found search string....
*" REFERENCE(IV_INPUT) TYPE STRING *" REFERENCE(EV_OUT) TYPE C DATA:alpha_num(120)TYPE c. alpha_num=' abcdefghijklopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,./;''[]\-=`<>?:"{}|_+~!@#$%^&*()'. IF NOTIV_inputCOalpha_num. ...
Allflatdata types; flat structures are handled like a data object of typecand can only contain any character-like components. The data typesSTRINGandXSTRING enumeration types; the name (maximum three characters) of theenumerated constantis used in uppercase letters, which defines the the current...