 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Get all occurrences of the string between any two specific characters in SAP ABAP
I usually use REGEX in all such cases as it is faster and easily readable and would recommend the same to you.
You can use something similar as the snippet to get your job done.
DATA: lv_para TYPE string. lv_para = ' You &are like& kite &flying& in a &hurricane&'. REPLACE ALL OCCURRENCES OF REGEX '&[^&]+&' IN lv_para WITH ''. WRITE lv_para.
Let me explain the regex for you. It should match the first ‘&’, then you can have any combination with multiple occurrences of ‘&’ and the last occurrence of ‘&’ must be matched.
Advertisements
 