DATA STR TYPE C LENGTH 50 VALUE ' HOW ARE YOU HOW'. REPLACE ALL OCCURRENCES OF STR1 IN STR WITH STR2. 替换字符串STR 中全部出现STR1 的地方. REPLACE STR1 IN STR WITH STR2 . 默认仅仅替换第一次出现的地方. REPLACE <STR1> WITH <STR2> INTO <STR> [LENGTH <1>] 仅仅能替换字符串STR ...
Sample Code:Replace all characters DATA: V_TEXT TYPE String. V_TEXT = 'AAAAFINDCBBBFINDB'. REPLACE ALL OCCURRENCES OF 'FIND' IN V_TEXT WITH 'XX'. IF SY-SUBRC = 0. WRITE V_TEXT. "AAAAXXCBBBXXB ENIDF. Explanation Similar to the first example, this example uses the REPLACE instruction...
SAP Managed Tags: ABAP Development HI All, How can I replace ' - ' with SPACE. I m using REPLACE ALL OCCURRENCES OF '-' IN VALUE WITH ' '. It is removing '-' but not getting space. How can I have space. Thanks, Anshul.Reply...
SAP Managed Tags: ABAP Development HI all, I have a simple but interesting case: DATA: lv_name TYPE string VALUE 'this;is;a;test'. REPLACE ALL OCCURRENCES OF ';' IN lv_name WITH space. WRITE lv_name. The strange thing is, this report's output is "thisisatest", but not "this ...
1. REPLACE [{FIRST OCCURRENCE}|{ALL OCCURRENCES} OF] pattern IN [section_of] dobj WITH new [IN {CHARACTER|BYTE} MODE] [replace_options]. Position-Based Replacement 2. REPLACE SECTION [OFFSET off] [LENGTH len] OF dobj WITH new [IN {CHARACTER|BYTE} MODE].Effect...
SAP Managed Tags: ABAP Development I am getting confused around the REPLACE ALL OCCURRENCES command.. basically.. I have a field that i need to convert to CAPS and replace the "spaces" with "_" But my lack of abap skills = Short dump! So this short dump hinted that the field was ...
SAP Managed Tags: ABAP Development Hi, I have a string which contains line breaks: '<HTML><HEAD> </HEAD> <BODY>' and it is shown to me in the debugger as: '<HTML><HEAD>#</HEAD>#<BODY>' Now I want to replace all line breaks in the string, but replace all occurrences of ...
replace all occurrences of ` ` in f1 with '-'. it works Reply kesavadas_thekkillath Active Contributor 2010 May 03 3:22 PM 0 Kudos 988 SAP Managed Tags: ABAP Development hi l_valuee = '12,445.88'. if l_valuee ca ','. REPLACE ALL OCCURENCES OF ',' IN l_valuee ...
Cause:Substring of length0creates an endless loop when searching for all occurrences. Runtime error:REPLACE_INFINITE_LOOP CX_SY_TAB_RANGE_OUT_OF_BOUNDS Cause:Illegal offset or row specification in the addition ofFROM ... OFFSET ... TO OFFSET. ...
SAP Managed Tags: ABAP Development Hi, How to replace a character in a string with blank space. Note: I have to change string CL_DS_1===CM01 to CL_DS_1 CM01. i.e) I have to replace '=' with ' '. I have already tried with REPLACE ALL OCCURRENCES OF '=' IN temp_fill_str...