Posts

Showing posts with the label String Operations

Mastering ABAP: In-Depth Analysis of String Operations and Internal Tables for Efficient SAP Development

Image
 Welcome back everyone, we were discussing about String operations in our last blog, So let’s continue it. String Operations : TRANSLATE The purpose of translate is to convert the string to uppercase or lowercase.. Syntax : TRANSLATE <string> TO UPPER CASE / LOWER CASE. In the above syntax : TRANSLATE = keyword, <string> = the string which needs to be converted, TO = keyword, UPPER CASE / LOWER CASE = keyword. *********************************************************** *Start of Program DATA : lv_input(50) type C value 'Welcome to Home', lv_input1(50) type c value 'welcome to home'. translate lv_input to LOWER CASE. "Display the first input. write : 'First input after translating to lower case : ', / lv_input. TRANSLATE lv_input1 TO UPPER CASE. *Displaying the second input. write :/ 'Second input after translating too upper case : ', / lv_input1. *End of Program *****************************************

Diving Deeper into ABAP: Exploring String Operations - Concatenate, Split, Condense, and More!

Image
 Welcome back everyone, We have discussed the different types of loops and system variables in our previous blog, Today We will continue with String operations. String Operations :- A string is a collection of characters. String is an elementary data type of variable length. String Operations :- CONCATENATE The purpose of concatenate is to combine the strings. Syntax : concatenate <c1> ———— <cn> into <c> separated by <s>. In the above syntax : concatenate = keyword, <c1>————<cn> = individual strings, into = keyword, <c> = final result string, separated by = keyword, <s> = separated. Create a executable program in SE38. *********************************************************************** *Start of Program *Declaring variables DATA : lv_input1(10) type c value 'Welcome', lv_input2(10) type c value 'To', lv_input3(10) type c value 'Home', lv_output type string. "No