Development resources, articles, tutorials, code samples, tools and downloads for SAP HANA and ABAP, HANA Database, SQLScript, SAP UI5, Screen Personas, Web Dynpro, Workflow
ABAP Tutorial - SAP Split and ABAP Split String Function
If you are an ABAP developer developing code in SAP ABAP string functions are frequently used like ABAP split string operations. SAP split string or splitting string using ABAP split operator can be managed using two methods.
The two SAP split variants are using variables and using ABAP internal table for storing splitted string values.
ABAP programmers can see how split string functions are used in below sample ABAP program.
First method uses SPLIT ... AT ... INTO ABAP command and stores outcome or splitted string fragments directly into string variables.
This method is suitable, if the ABAP developer is only interested in first n splitted string data.
The second method uses the same ABAP SPLIT command with one difference. In the second usage of SAP function, the output result is stored in an internal table.
So the programmers can loop through the ABAP internal table and read every splitted string fragment.
Here is the output of the above ABAP split string sample code. I hope the split code in this ABAP tutorial is useful for programmers.