ABAP Strings: Declaration, Conversion, Operations, and Examples, Slides of Computer Programming

An introduction to abap strings, including their declaration using the c and n data types, conversion to numeric fields, and various operations such as shifting, replacing, condensing, and concatenating. Examples are also provided.

Typology: Slides

2012/2013

Uploaded on 09/27/2013

vikrant
vikrant 🇮🇳

4.4

(9)

119 documents

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Introduction ABAP
Strings
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download ABAP Strings: Declaration, Conversion, Operations, and Examples and more Slides Computer Programming in PDF only on Docsity!

Introduction ABAP

Strings

Introduction (Strings)

 There are three character-based data types

 c stores character fields of a fixed length

 n stores numeric character fields of a fixed

length

 Fields that contain only number but are not

really numeric (telephone number)

 Data is right aligned and leading zeros are

inserted

 string stores variable length strings

String Conversion

 When converting a character string „c‟ to a „n‟

string, only the digits are copied

 The field is right justified

 The field is padded with leading zeros

String Operations

 Remember that this is a business language

 Strings are “padded” into fixed-length string

fields

 We can move characters in a string (SHIFT)

 Replace substrings (REPLACE)

 Pack and concatenate strings

 Split strings

String Operations (REPLACE)

 REPLACE string1 IN varname WITH string  Replaces string1 WITH string

String Operations

(CONDENSE)

 Deletes redundant spaces from a string

 Leading spaces are deleted

 NO-GAPS removes all spaces

 CONDENSE c [NO-GAPS]

String Operations (SPLIT)

 SPLIT c AT del INTO c1 … cn

 Splits string c using the delimiter del into a list

of variables

 Ok, this is hokey. We need to provide enough

output fields for the record.