introduction abap strings n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Introduction ABAP Strings PowerPoint Presentation
Download Presentation
Introduction ABAP Strings

Loading in 2 Seconds...

play fullscreen
1 / 10

Introduction ABAP Strings - PowerPoint PPT Presentation


  • 153 Views
  • Uploaded on

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)

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Introduction ABAP Strings' - blanca


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
introduction strings
Introduction (Strings)
  • There are three character-based data types
  • cstores 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 declaration example
String Declaration (Example)
  • Declare a two character string
    • DATA state TYPE c LENGTH 2.
  • TYPE LIKE and VALUE keywords continue to apply
    • DATA state TYPE c LENGTH 2 VALUE ‘nv’.
string conversion
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
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 shift
String Operations (SHIFT)
  • SHIFT varname [BY n PLACES] [mode]
    • Where mode is LEFT, RIGHT, or CIRCULAR
    • If n is omitted, the default value is 1
    • If mode is omitted, the default mode is LEFT
  • Optional clause
    • DELETING [LEADING | TRAILING] str
string operations replace
String Operations (REPLACE)
  • REPLACE string1 IN varname WITH string2
    • Replaces string1 WITH string2
string operations condense
String Operations (CONDENSE)
  • Deletes redundant spaces from a string
    • Leading spaces are deleted
    • NO-GAPS removes all spaces
  • CONDENSE c [NO-GAPS]
string operations concatenate
String Operations (CONCATENATE)
  • CONCATENATE c1 … cn INTO c [SEPARATED BY] s
    • Concatenates the list of strings into an output string
    • s is inserted as the character seperator
string operations split
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.