Professional Documents
Culture Documents
4. Replacing values
- Define a string with value ‘PUPPY’.
- Change it to ‘MUMMY’ using ABAP command
5. Translate
- Define t5(10) value ‘aBcDeFgHiJ’.
- Define string5 like t5.
- Assign t5 to string5. Translate to uppercase
- Assign t5 to string5. Translate to lowercase
6. Overlay strings
- Define t6(10) TYPE c VALUE 'a c e g i ',
string6 LIKE t6,
over6(10) TYPE c VALUE 'ABCDEFGHIJ'
- Assign value of t6 to string6
- Overlay string6 with over6 and output the result
7. Search strings
- Define string7(30) TYPE c VALUE 'This is a little sentence.'
8. Length of a string
- Define word1(20) TYPE c VALUE '12345',
word2(20) TYPE c ,
word3(20) TYPE c VALUE ' 4 '.
- Get the lengths of strings word1, word2, word3.
- Display the result.
9. Condensing strings
- Define string9(25) TYPE c VALUE ' one two three four'.
- Condense the above string
- Condense string specifying no gaps
- Display the results along with the string length in each case.