DATA STR1 TYPE C LENGTH 3 VALUE 'HOW'. FIND ALL OCCURRENCES OF STR1 IN STR RESULTS RESLT. 获得字符串长度. STRLEN(<c>) :<c>数据类型仅仅能是C,N,D,T DATA STR TYPE C LENGTH 50 VALUE ' HOW ARE YOU HOW'. DATA INT1 TYPE I. INT1 = STRLEN( STR ). 获取字符串STR的长度,结果放入...
offTYPEi, lenTYPEi. text1='I know you know'.REPLACEALL OCCURRENCESOF'know'INSECTIONOFFSET11LENGTH4of"在11~14索引范围内匹配替换text1WITH'should know that'REPLACEMENT COUNT cnt"发生的替换次数REPLACEMENT OFFSET off"最后一次发生替换的位置REPLACEMENT LENGTH len.WRITE: /text1, cnt, off,len. I know...
{ALL OCCURRENCES} OF] {[SUBSTRING] sub_string} | {REGEX regex} IN [SECTION [OFFSET off] [LENGTH len] OF] dobj WITH new [IN {BYTE|CHARACTER} MODE] [{RESPECTING|IGNORING} CASE] [REPLACEMENT COUNT rcnt] { {[REPLACEMENT OFFSET roff] [REPLACEMENT LENGTH rlen]} | [RESULTS result_tab|...
SAP Managed Tags: ABAP Development hi experts, I have a string like this "a<tab character>b<tab character>c<tab character>d". for my processing i want the output like "abcd". How can i replace all occurances of this tab character from my string. tab character = a hexa decimal char...
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...
At tab Fields, create some fields (key or non-key fields) which you want to filter/store data in your program. In this sample, I will create 3 key fields which are Company Code (BUKRS), Fiscal Year(GJAHR), and document number (BELNR). ...
SAP Managed Tags: ABAP Development Hi I have an requirement where i have to replace one character with space. Suppose in 'SAPISGREAT' word ' I ' shoud get replace with space liek SAP SGREAT. The word might change dynamically.So whenever ' I ' comes in the word I sould replace wit...
SAP Managed Tags: ABAP Development In BW I have a record coming in and wtihin the address field the first character contains a ! or #. This is causing the DSO not to activate due to invalid characters of ! or # as the first character. I am trying to replace these characters with ...
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 ...