SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Downloaden Sie, um offline zu lesen
ABAP 7.02 New Features
New String Functions




     Johann Fößleitner, Cadaxo GmbH   https://twitter.com/foessleitnerj
Table of Contents
  ➤   cmax/cmin – character like extreme value function
  ➤   condense – condensation function
  ➤   concate_lines_of – linking function
  ➤   escape – escape function
  ➤   insert – insert function
  ➤   match – match function
  ➤   repeat – repeat function
  ➤   replace – replace function
  ➤   reverse – reverse function
  ➤   shift_left/shift_right – shift function
  ➤   substring – substring function
  ➤   to_upper/to_lower/… - upper and lower case function
  ➤   translate – translate function
  ➤   distance – distance function
cmax/cmin – character like extreme value
function
•   comparison up to a value of 9 character like arguments
•   result is the smallest (cmin) or the biggest (cmax) delivered
    character
•   comparison is used codepage-based
cmax/cmin – character like extreme value
function

l_result = cmax(   val1 = 'AAAC' val2 = 'AAAB' val3 = 'AAAD' ).
result: AAAD
l_result = cmax(   val1 = 'AAAC' val2 = 'AZAB' val3 = 'AAAD' ).
result: AZAB
l_result = cmin(   val1 = 'AAAC' val2 = 'AAAB' val3 = 'AAAD' ).
result : AAAB
l_result = cmin(   val1 = 'AAAC' val2 = '0AAC' val3 = 'AAAD' ).
result : 0AAC
condense – condensation function
•   condensates the content of a string
•   provides more possibilities than the ABAP Command
    Condense
•   removes leading and ending character

l_string = condense( val = ‘XXXabcXXXdefXXX‘ del = ‘X‘ from = ‘X‘ to = ‘X‘ ).
result: abcXdef
concat_lines_of – linking function
•   links lines from an intern table in a string
•   additive sep enables the seperation by a seperator


L_string = concate_lines_of( table = tab sep = ‘;‘ ).
escape – escape function
• enables the rule-based replacing of a string with escape
  symbols
• usable rules are defined as constants in
  CL_ABAP_FORMAT
escape – escape function
DATA l_string0 TYPE string.
DATA l_string1 TYPE string.

l_string0 = 'http://www.cadaxo.com'.
l_string1 = escape( val = l_string0 format = cl_abap_format=>e_url_full ).

WRITE: / l_string0, / l_string1.

result:

http://www.cadaxo.com
http%3A%2F%2Fwww.cadaxo.com
insert – insert function
•    insert a string at any position of another string


L_string = ‘NewsABAP‘.
L_result = insert( val = l_string sub = ‘ in ‘ off = 5 ).
Write: l_string.

result:

news in ABAP
match – match function
•   searches for a text with a specific Regex accordance
•   more information of Regex can be gathered from SAP online
    documentation
repeat – repeat function
•    generates a string through repitition of another string


l_string = repeat( val = ‘ABC‘ occ = 5 ).
write: l_string.

result:

ABCABCABCABCABC
replace – replace function
•   replaces a section of a string
•   section can be determined by an offset-/length or by Regex


l_result = replace( val = 'ABAP xx GOOD' off = 6 len = 0 with = 'IS' ).
result: ‘ABAP xISx GOOD‘

l_result = replace( val = 'ABAP xx GOOD' off = 4 len = 4 with = 'IS' ).
result: ‘ABAPISGOOD‘
reverse – reverse function
                 •   reverses a complete string


                 L_string = ‘PABA‘.
                 L_string = reverse( l_string ).

                 result: ABAP




PS: If you know a useful application of this function, please let me know!
substring, substring_... – substring function
•   investigation of a section from a given character amount

l_result = substring( val = 'ABCDEFGH' off = 3 len = 4 ).
result: ‘DEFG‘
l_result = substring_from( val = 'ABCDEFGH' sub = 'DEF' ).
result: ‘DEFGH‘
l_result = substring_after( val = 'ABCDEFGH' sub = 'DEF' ).
result: ‘GH‘
l_result = substring_before( val = 'ABCDEFGH' sub = 'DEF' ).
result: ‘ABC‘
l_result = substring_to( val = 'ABCDEFGH' sub = 'DEF' ).
result: ‘ABCDEF‘
to_upper, to_lower, to_mixed, from_mixed
upper and lower case function
•   to_upper/to_lower conforms the command TRANSLATE
    TO UPPER/LOWER CASE
•   to_mixed transforms all letters from the second position on
    in lower cases
•   from_mixed inserts from left to right from the second
    position on the first declared character from the additive sep
     •   further additives are case and min
to_upper, to_lower, to_mixed, from_mixed
upper and lower case function



l_result = to_mixed( val = 'CADAXO GMBH' ).

result: ‘Cadaxo gmbh‘
distance – distance function
                   •   investigates the edit distance (Levenshtein-distance) of to
                       strings
                         •   minimal amount of insert, delete or replace processes to get from string
                             1 to string 2

                   l_int = distance( val1 = 'CADAXO GMBH' val2 = 'ADAXOGMBH' ).
                   result: 2 („C“ and a blank have to be inserted)

                   l_int = distance( val1 = 'ABCD' val2 = 'EFGH' ).
                   result: 4 (all characters have to be replaced)




http://de.wikipedia.org/wiki/Levenshtein-Distanz
Cadaxo gmbh, founded in 2009, set out to simplify the SAP working
environment with small add-ons.

              SQL Cockpit 2.0 – the most efficient Analysis add on for
              SAP environments, business users, software developers and
              support alike. SQL Cockpit enable quick and flexible data
              retrievel (without report development and without
              transports) directly in the SAP productive system.

              http://www.cadaxo.com/content/en/products/sql-cockpit.html


                                                  http://com.slideshare.net/cadaxogmbh
                                                  http://www.youtube.com/CadaxoGmbH
                                                  http://www.linkedin.com/company/cadaxo-gmbh
                                                  https://twitter.com/cadaxo
The multiplication or the translation of this document or
sections out of it is without the expressively authorisation of
Cadaxo GmbH prohibited.

SAP®, ABAP™, R/3®, SAP NetWeaver® are brands or
registered brands of the SAP AG.

All other products are brands or registered brands of the
particular company.

© 2013 Cadaxo GesmbH. All rights reserved.

Weitere ähnliche Inhalte

Was ist angesagt?

15 Troubleshooting tips and Tricks for Database 21c - KSAOUG
15 Troubleshooting tips and Tricks for Database 21c - KSAOUG15 Troubleshooting tips and Tricks for Database 21c - KSAOUG
15 Troubleshooting tips and Tricks for Database 21c - KSAOUGSandesh Rao
 
Deep Dive into the New Features of Apache Spark 3.0
Deep Dive into the New Features of Apache Spark 3.0Deep Dive into the New Features of Apache Spark 3.0
Deep Dive into the New Features of Apache Spark 3.0Databricks
 
From HDFS to S3: Migrate Pinterest Apache Spark Clusters
From HDFS to S3: Migrate Pinterest Apache Spark ClustersFrom HDFS to S3: Migrate Pinterest Apache Spark Clusters
From HDFS to S3: Migrate Pinterest Apache Spark ClustersDatabricks
 
Making Structured Streaming Ready for Production
Making Structured Streaming Ready for ProductionMaking Structured Streaming Ready for Production
Making Structured Streaming Ready for ProductionDatabricks
 
SAP HANA SPS09 - SAP HANA Core & SQL
SAP HANA SPS09 - SAP HANA Core & SQLSAP HANA SPS09 - SAP HANA Core & SQL
SAP HANA SPS09 - SAP HANA Core & SQLSAP Technology
 
The Roadmap for SQL Server 2019
The Roadmap for SQL Server 2019The Roadmap for SQL Server 2019
The Roadmap for SQL Server 2019Amit Banerjee
 
Cost-based Query Optimization in Apache Phoenix using Apache Calcite
Cost-based Query Optimization in Apache Phoenix using Apache CalciteCost-based Query Optimization in Apache Phoenix using Apache Calcite
Cost-based Query Optimization in Apache Phoenix using Apache CalciteJulian Hyde
 
Performance Update: When Apache ORC Met Apache Spark
Performance Update: When Apache ORC Met Apache SparkPerformance Update: When Apache ORC Met Apache Spark
Performance Update: When Apache ORC Met Apache SparkDataWorks Summit
 
Optimizing Delta/Parquet Data Lakes for Apache Spark
Optimizing Delta/Parquet Data Lakes for Apache SparkOptimizing Delta/Parquet Data Lakes for Apache Spark
Optimizing Delta/Parquet Data Lakes for Apache SparkDatabricks
 
Sap fiori push notifications
Sap fiori push notificationsSap fiori push notifications
Sap fiori push notificationsAnkur Garg
 
AEM 6.1 User Interface Customization
AEM 6.1 User Interface CustomizationAEM 6.1 User Interface Customization
AEM 6.1 User Interface CustomizationChristian Meyer
 
Oracle RAC on Extended Distance Clusters - Customer Examples
Oracle RAC on Extended Distance Clusters - Customer ExamplesOracle RAC on Extended Distance Clusters - Customer Examples
Oracle RAC on Extended Distance Clusters - Customer ExamplesMarkus Michalewicz
 
HANA WITH ABAP OVERVIEW
HANA WITH ABAP OVERVIEWHANA WITH ABAP OVERVIEW
HANA WITH ABAP OVERVIEWdheerajad
 
Reduce Amazon RDS Costs up to 50% with Proxies
Reduce Amazon RDS Costs up to 50% with ProxiesReduce Amazon RDS Costs up to 50% with Proxies
Reduce Amazon RDS Costs up to 50% with ProxiesJohn Varghese
 
From DataFrames to Tungsten: A Peek into Spark's Future-(Reynold Xin, Databri...
From DataFrames to Tungsten: A Peek into Spark's Future-(Reynold Xin, Databri...From DataFrames to Tungsten: A Peek into Spark's Future-(Reynold Xin, Databri...
From DataFrames to Tungsten: A Peek into Spark's Future-(Reynold Xin, Databri...Spark Summit
 
Oracle Goldengate for Big Data - LendingClub Implementation
Oracle Goldengate for Big Data - LendingClub ImplementationOracle Goldengate for Big Data - LendingClub Implementation
Oracle Goldengate for Big Data - LendingClub ImplementationVengata Guruswamy
 

Was ist angesagt? (20)

15 Troubleshooting tips and Tricks for Database 21c - KSAOUG
15 Troubleshooting tips and Tricks for Database 21c - KSAOUG15 Troubleshooting tips and Tricks for Database 21c - KSAOUG
15 Troubleshooting tips and Tricks for Database 21c - KSAOUG
 
Deep Dive into the New Features of Apache Spark 3.0
Deep Dive into the New Features of Apache Spark 3.0Deep Dive into the New Features of Apache Spark 3.0
Deep Dive into the New Features of Apache Spark 3.0
 
From HDFS to S3: Migrate Pinterest Apache Spark Clusters
From HDFS to S3: Migrate Pinterest Apache Spark ClustersFrom HDFS to S3: Migrate Pinterest Apache Spark Clusters
From HDFS to S3: Migrate Pinterest Apache Spark Clusters
 
Making Structured Streaming Ready for Production
Making Structured Streaming Ready for ProductionMaking Structured Streaming Ready for Production
Making Structured Streaming Ready for Production
 
SAP HANA SPS09 - SAP HANA Core & SQL
SAP HANA SPS09 - SAP HANA Core & SQLSAP HANA SPS09 - SAP HANA Core & SQL
SAP HANA SPS09 - SAP HANA Core & SQL
 
SAP HANA on Red Hat
SAP HANA on Red HatSAP HANA on Red Hat
SAP HANA on Red Hat
 
The Roadmap for SQL Server 2019
The Roadmap for SQL Server 2019The Roadmap for SQL Server 2019
The Roadmap for SQL Server 2019
 
Cost-based Query Optimization in Apache Phoenix using Apache Calcite
Cost-based Query Optimization in Apache Phoenix using Apache CalciteCost-based Query Optimization in Apache Phoenix using Apache Calcite
Cost-based Query Optimization in Apache Phoenix using Apache Calcite
 
Performance Update: When Apache ORC Met Apache Spark
Performance Update: When Apache ORC Met Apache SparkPerformance Update: When Apache ORC Met Apache Spark
Performance Update: When Apache ORC Met Apache Spark
 
Optimizing Delta/Parquet Data Lakes for Apache Spark
Optimizing Delta/Parquet Data Lakes for Apache SparkOptimizing Delta/Parquet Data Lakes for Apache Spark
Optimizing Delta/Parquet Data Lakes for Apache Spark
 
ORC Deep Dive 2020
ORC Deep Dive 2020ORC Deep Dive 2020
ORC Deep Dive 2020
 
Parquet overview
Parquet overviewParquet overview
Parquet overview
 
Sap fiori push notifications
Sap fiori push notificationsSap fiori push notifications
Sap fiori push notifications
 
AEM 6.1 User Interface Customization
AEM 6.1 User Interface CustomizationAEM 6.1 User Interface Customization
AEM 6.1 User Interface Customization
 
Oracle RAC on Extended Distance Clusters - Customer Examples
Oracle RAC on Extended Distance Clusters - Customer ExamplesOracle RAC on Extended Distance Clusters - Customer Examples
Oracle RAC on Extended Distance Clusters - Customer Examples
 
HANA WITH ABAP OVERVIEW
HANA WITH ABAP OVERVIEWHANA WITH ABAP OVERVIEW
HANA WITH ABAP OVERVIEW
 
Reduce Amazon RDS Costs up to 50% with Proxies
Reduce Amazon RDS Costs up to 50% with ProxiesReduce Amazon RDS Costs up to 50% with Proxies
Reduce Amazon RDS Costs up to 50% with Proxies
 
From DataFrames to Tungsten: A Peek into Spark's Future-(Reynold Xin, Databri...
From DataFrames to Tungsten: A Peek into Spark's Future-(Reynold Xin, Databri...From DataFrames to Tungsten: A Peek into Spark's Future-(Reynold Xin, Databri...
From DataFrames to Tungsten: A Peek into Spark's Future-(Reynold Xin, Databri...
 
Migacion forms apex
Migacion forms   apexMigacion forms   apex
Migacion forms apex
 
Oracle Goldengate for Big Data - LendingClub Implementation
Oracle Goldengate for Big Data - LendingClub ImplementationOracle Goldengate for Big Data - LendingClub Implementation
Oracle Goldengate for Big Data - LendingClub Implementation
 

Andere mochten auch

ABAP Test & Troubleshooting @SITMuc 2013
ABAP Test & Troubleshooting @SITMuc 2013ABAP Test & Troubleshooting @SITMuc 2013
ABAP Test & Troubleshooting @SITMuc 2013SbgMartin
 
ITSS Trainning | Curso de SAP ABAP Foundations
ITSS Trainning | Curso de SAP ABAP FoundationsITSS Trainning | Curso de SAP ABAP Foundations
ITSS Trainning | Curso de SAP ABAP FoundationsCharles Aragão
 
Abap query
Abap queryAbap query
Abap querybrtkow
 
Comandos e funções em abap
Comandos e funções em abapComandos e funções em abap
Comandos e funções em abapalienscorporation
 
Funções - Tutorial ABAP
Funções - Tutorial ABAPFunções - Tutorial ABAP
Funções - Tutorial ABAPRicardo Ishida
 
Abap coding standards
Abap coding standardsAbap coding standards
Abap coding standardssurendra1579
 
Manikanta Sai Kumar Karri SAP ABAP and OO ABAP 3 Years.doc
Manikanta Sai Kumar Karri SAP ABAP and OO ABAP 3 Years.docManikanta Sai Kumar Karri SAP ABAP and OO ABAP 3 Years.doc
Manikanta Sai Kumar Karri SAP ABAP and OO ABAP 3 Years.docmanikanta sai kumar karri
 
Lecture01 abap on line
Lecture01 abap on lineLecture01 abap on line
Lecture01 abap on lineMilind Patil
 
Abap course chapter 6 specialities for erp software
Abap course   chapter 6 specialities for erp softwareAbap course   chapter 6 specialities for erp software
Abap course chapter 6 specialities for erp softwareMilind Patil
 
Abap course chapter 5 dynamic programs
Abap course   chapter 5 dynamic programsAbap course   chapter 5 dynamic programs
Abap course chapter 5 dynamic programsMilind Patil
 
ABAP Qualitäts-Benchmark: Eine Analyse von über 200 SAP Installationen
ABAP Qualitäts-Benchmark: Eine Analyse von über 200 SAP InstallationenABAP Qualitäts-Benchmark: Eine Analyse von über 200 SAP Installationen
ABAP Qualitäts-Benchmark: Eine Analyse von über 200 SAP InstallationenVirtual Forge
 
SAP ABAP Proxy Objects: Configuración del entorno
SAP ABAP Proxy Objects: Configuración del entornoSAP ABAP Proxy Objects: Configuración del entorno
SAP ABAP Proxy Objects: Configuración del entornoOreka IT
 
Usability in ABAP Programs - SITSP2011
Usability in ABAP Programs - SITSP2011Usability in ABAP Programs - SITSP2011
Usability in ABAP Programs - SITSP2011Mauricio Cruz
 

Andere mochten auch (20)

ABAP Test & Troubleshooting @SITMuc 2013
ABAP Test & Troubleshooting @SITMuc 2013ABAP Test & Troubleshooting @SITMuc 2013
ABAP Test & Troubleshooting @SITMuc 2013
 
ITSS Trainning | Curso de SAP ABAP Foundations
ITSS Trainning | Curso de SAP ABAP FoundationsITSS Trainning | Curso de SAP ABAP Foundations
ITSS Trainning | Curso de SAP ABAP Foundations
 
Qué es abap
Qué es abapQué es abap
Qué es abap
 
Abap query
Abap queryAbap query
Abap query
 
Analista programador SAP ABAP IV
Analista programador SAP ABAP IVAnalista programador SAP ABAP IV
Analista programador SAP ABAP IV
 
Web dynpro for abap
Web dynpro for abapWeb dynpro for abap
Web dynpro for abap
 
Icones - ABAP
Icones - ABAPIcones - ABAP
Icones - ABAP
 
Comandos e funções em abap
Comandos e funções em abapComandos e funções em abap
Comandos e funções em abap
 
View - Tutorial ABAP
View - Tutorial ABAPView - Tutorial ABAP
View - Tutorial ABAP
 
Sap abap Q&A
Sap abap Q&A Sap abap Q&A
Sap abap Q&A
 
Funções - Tutorial ABAP
Funções - Tutorial ABAPFunções - Tutorial ABAP
Funções - Tutorial ABAP
 
Abap coding standards
Abap coding standardsAbap coding standards
Abap coding standards
 
Basic abap oo
Basic abap ooBasic abap oo
Basic abap oo
 
Manikanta Sai Kumar Karri SAP ABAP and OO ABAP 3 Years.doc
Manikanta Sai Kumar Karri SAP ABAP and OO ABAP 3 Years.docManikanta Sai Kumar Karri SAP ABAP and OO ABAP 3 Years.doc
Manikanta Sai Kumar Karri SAP ABAP and OO ABAP 3 Years.doc
 
Lecture01 abap on line
Lecture01 abap on lineLecture01 abap on line
Lecture01 abap on line
 
Abap course chapter 6 specialities for erp software
Abap course   chapter 6 specialities for erp softwareAbap course   chapter 6 specialities for erp software
Abap course chapter 6 specialities for erp software
 
Abap course chapter 5 dynamic programs
Abap course   chapter 5 dynamic programsAbap course   chapter 5 dynamic programs
Abap course chapter 5 dynamic programs
 
ABAP Qualitäts-Benchmark: Eine Analyse von über 200 SAP Installationen
ABAP Qualitäts-Benchmark: Eine Analyse von über 200 SAP InstallationenABAP Qualitäts-Benchmark: Eine Analyse von über 200 SAP Installationen
ABAP Qualitäts-Benchmark: Eine Analyse von über 200 SAP Installationen
 
SAP ABAP Proxy Objects: Configuración del entorno
SAP ABAP Proxy Objects: Configuración del entornoSAP ABAP Proxy Objects: Configuración del entorno
SAP ABAP Proxy Objects: Configuración del entorno
 
Usability in ABAP Programs - SITSP2011
Usability in ABAP Programs - SITSP2011Usability in ABAP Programs - SITSP2011
Usability in ABAP Programs - SITSP2011
 

Ähnlich wie Abap 7 02 new features - new string functions

Ähnlich wie Abap 7 02 new features - new string functions (20)

Matlab Functions
Matlab FunctionsMatlab Functions
Matlab Functions
 
Syntactic analysis in NLP
Syntactic analysis in NLPSyntactic analysis in NLP
Syntactic analysis in NLP
 
Php
PhpPhp
Php
 
Abap 7.40
Abap 7.40Abap 7.40
Abap 7.40
 
New features in abap
New features in abapNew features in abap
New features in abap
 
Compiler Construction for DLX Processor
Compiler Construction for DLX Processor Compiler Construction for DLX Processor
Compiler Construction for DLX Processor
 
Scilab as a calculator
Scilab as a calculatorScilab as a calculator
Scilab as a calculator
 
JavaScript.pptx
JavaScript.pptxJavaScript.pptx
JavaScript.pptx
 
Matlab commands
Matlab commandsMatlab commands
Matlab commands
 
Matlab commands
Matlab commandsMatlab commands
Matlab commands
 
Java 8
Java 8Java 8
Java 8
 
CSS Less framework overview, Pros and Cons
CSS Less framework overview, Pros and ConsCSS Less framework overview, Pros and Cons
CSS Less framework overview, Pros and Cons
 
Complete list of all sap abap keywords
Complete list of all sap abap keywordsComplete list of all sap abap keywords
Complete list of all sap abap keywords
 
2 R Tutorial Programming
2 R Tutorial Programming2 R Tutorial Programming
2 R Tutorial Programming
 
DEBUGGING FUZZY XPATH QUERIES
DEBUGGING FUZZY XPATH QUERIESDEBUGGING FUZZY XPATH QUERIES
DEBUGGING FUZZY XPATH QUERIES
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
 
Applicative Functor - Part 2
Applicative Functor - Part 2Applicative Functor - Part 2
Applicative Functor - Part 2
 
Sap sapscripts tips and tricks
Sap sapscripts tips and tricksSap sapscripts tips and tricks
Sap sapscripts tips and tricks
 
Diving into HHVM Extensions (php[tek] 2016)
Diving into HHVM Extensions (php[tek] 2016)Diving into HHVM Extensions (php[tek] 2016)
Diving into HHVM Extensions (php[tek] 2016)
 
Real life-coffeescript
Real life-coffeescriptReal life-coffeescript
Real life-coffeescript
 

Mehr von Cadaxo GmbH

Webinar SAP/ABAP und Microsoft
Webinar  SAP/ABAP und MicrosoftWebinar  SAP/ABAP und Microsoft
Webinar SAP/ABAP und MicrosoftCadaxo GmbH
 
Webinar - ABAP Releasenotes 7.53/7.54
Webinar - ABAP Releasenotes 7.53/7.54Webinar - ABAP Releasenotes 7.53/7.54
Webinar - ABAP Releasenotes 7.53/7.54Cadaxo GmbH
 
Webinar ABAP Managed Database Procedures
Webinar ABAP Managed Database ProceduresWebinar ABAP Managed Database Procedures
Webinar ABAP Managed Database ProceduresCadaxo GmbH
 
Webinar - ABAP Development Tools
Webinar - ABAP Development ToolsWebinar - ABAP Development Tools
Webinar - ABAP Development ToolsCadaxo GmbH
 
Webinar - Entwurfsmuster in ABAP
Webinar - Entwurfsmuster in ABAPWebinar - Entwurfsmuster in ABAP
Webinar - Entwurfsmuster in ABAPCadaxo GmbH
 
Webinar Modern ABAP
Webinar Modern ABAPWebinar Modern ABAP
Webinar Modern ABAPCadaxo GmbH
 
Webinar ABAP 7.51 Releaseinformationen
Webinar ABAP 7.51 ReleaseinformationenWebinar ABAP 7.51 Releaseinformationen
Webinar ABAP 7.51 ReleaseinformationenCadaxo GmbH
 
Webinar - SAP Gateway
Webinar  - SAP GatewayWebinar  - SAP Gateway
Webinar - SAP GatewayCadaxo GmbH
 
Webinar - ABAP CDS Views
Webinar - ABAP CDS ViewsWebinar - ABAP CDS Views
Webinar - ABAP CDS ViewsCadaxo GmbH
 
ABAP CodeRetreat 20.5.2017 Vienna - Refactoring
ABAP CodeRetreat 20.5.2017 Vienna - RefactoringABAP CodeRetreat 20.5.2017 Vienna - Refactoring
ABAP CodeRetreat 20.5.2017 Vienna - RefactoringCadaxo GmbH
 
SQL Cockpit 3.1 - Overview
SQL Cockpit 3.1 - OverviewSQL Cockpit 3.1 - Overview
SQL Cockpit 3.1 - OverviewCadaxo GmbH
 
Webinar - SAP BOPF
Webinar - SAP BOPFWebinar - SAP BOPF
Webinar - SAP BOPFCadaxo GmbH
 
Webinar - ABAP 7.50 Releaseabhängige Änderungen
Webinar - ABAP 7.50 Releaseabhängige ÄnderungenWebinar - ABAP 7.50 Releaseabhängige Änderungen
Webinar - ABAP 7.50 Releaseabhängige ÄnderungenCadaxo GmbH
 
TDD mit ABAP Units
TDD mit ABAP UnitsTDD mit ABAP Units
TDD mit ABAP UnitsCadaxo GmbH
 
Clean code in ABAP
Clean code in ABAPClean code in ABAP
Clean code in ABAPCadaxo GmbH
 
Webinar - Boost your ABAP
Webinar - Boost your ABAPWebinar - Boost your ABAP
Webinar - Boost your ABAPCadaxo GmbH
 
SQL Cockpit - Releasenotes 3.0
SQL Cockpit - Releasenotes 3.0SQL Cockpit - Releasenotes 3.0
SQL Cockpit - Releasenotes 3.0Cadaxo GmbH
 
Webinar ABAP 7.40 sp5/sp8 Releaseinformationen
Webinar ABAP 7.40 sp5/sp8 ReleaseinformationenWebinar ABAP 7.40 sp5/sp8 Releaseinformationen
Webinar ABAP 7.40 sp5/sp8 ReleaseinformationenCadaxo GmbH
 
Prüfen Sie Ihre ABAP SQL Abfragen auf SAP HANA Tauglichkeit
Prüfen Sie Ihre ABAP SQL Abfragen auf SAP HANA TauglichkeitPrüfen Sie Ihre ABAP SQL Abfragen auf SAP HANA Tauglichkeit
Prüfen Sie Ihre ABAP SQL Abfragen auf SAP HANA TauglichkeitCadaxo GmbH
 
Cadaxo SQL Cockpit 2.0 - Neue Features im Detail
Cadaxo SQL Cockpit 2.0 - Neue Features im DetailCadaxo SQL Cockpit 2.0 - Neue Features im Detail
Cadaxo SQL Cockpit 2.0 - Neue Features im DetailCadaxo GmbH
 

Mehr von Cadaxo GmbH (20)

Webinar SAP/ABAP und Microsoft
Webinar  SAP/ABAP und MicrosoftWebinar  SAP/ABAP und Microsoft
Webinar SAP/ABAP und Microsoft
 
Webinar - ABAP Releasenotes 7.53/7.54
Webinar - ABAP Releasenotes 7.53/7.54Webinar - ABAP Releasenotes 7.53/7.54
Webinar - ABAP Releasenotes 7.53/7.54
 
Webinar ABAP Managed Database Procedures
Webinar ABAP Managed Database ProceduresWebinar ABAP Managed Database Procedures
Webinar ABAP Managed Database Procedures
 
Webinar - ABAP Development Tools
Webinar - ABAP Development ToolsWebinar - ABAP Development Tools
Webinar - ABAP Development Tools
 
Webinar - Entwurfsmuster in ABAP
Webinar - Entwurfsmuster in ABAPWebinar - Entwurfsmuster in ABAP
Webinar - Entwurfsmuster in ABAP
 
Webinar Modern ABAP
Webinar Modern ABAPWebinar Modern ABAP
Webinar Modern ABAP
 
Webinar ABAP 7.51 Releaseinformationen
Webinar ABAP 7.51 ReleaseinformationenWebinar ABAP 7.51 Releaseinformationen
Webinar ABAP 7.51 Releaseinformationen
 
Webinar - SAP Gateway
Webinar  - SAP GatewayWebinar  - SAP Gateway
Webinar - SAP Gateway
 
Webinar - ABAP CDS Views
Webinar - ABAP CDS ViewsWebinar - ABAP CDS Views
Webinar - ABAP CDS Views
 
ABAP CodeRetreat 20.5.2017 Vienna - Refactoring
ABAP CodeRetreat 20.5.2017 Vienna - RefactoringABAP CodeRetreat 20.5.2017 Vienna - Refactoring
ABAP CodeRetreat 20.5.2017 Vienna - Refactoring
 
SQL Cockpit 3.1 - Overview
SQL Cockpit 3.1 - OverviewSQL Cockpit 3.1 - Overview
SQL Cockpit 3.1 - Overview
 
Webinar - SAP BOPF
Webinar - SAP BOPFWebinar - SAP BOPF
Webinar - SAP BOPF
 
Webinar - ABAP 7.50 Releaseabhängige Änderungen
Webinar - ABAP 7.50 Releaseabhängige ÄnderungenWebinar - ABAP 7.50 Releaseabhängige Änderungen
Webinar - ABAP 7.50 Releaseabhängige Änderungen
 
TDD mit ABAP Units
TDD mit ABAP UnitsTDD mit ABAP Units
TDD mit ABAP Units
 
Clean code in ABAP
Clean code in ABAPClean code in ABAP
Clean code in ABAP
 
Webinar - Boost your ABAP
Webinar - Boost your ABAPWebinar - Boost your ABAP
Webinar - Boost your ABAP
 
SQL Cockpit - Releasenotes 3.0
SQL Cockpit - Releasenotes 3.0SQL Cockpit - Releasenotes 3.0
SQL Cockpit - Releasenotes 3.0
 
Webinar ABAP 7.40 sp5/sp8 Releaseinformationen
Webinar ABAP 7.40 sp5/sp8 ReleaseinformationenWebinar ABAP 7.40 sp5/sp8 Releaseinformationen
Webinar ABAP 7.40 sp5/sp8 Releaseinformationen
 
Prüfen Sie Ihre ABAP SQL Abfragen auf SAP HANA Tauglichkeit
Prüfen Sie Ihre ABAP SQL Abfragen auf SAP HANA TauglichkeitPrüfen Sie Ihre ABAP SQL Abfragen auf SAP HANA Tauglichkeit
Prüfen Sie Ihre ABAP SQL Abfragen auf SAP HANA Tauglichkeit
 
Cadaxo SQL Cockpit 2.0 - Neue Features im Detail
Cadaxo SQL Cockpit 2.0 - Neue Features im DetailCadaxo SQL Cockpit 2.0 - Neue Features im Detail
Cadaxo SQL Cockpit 2.0 - Neue Features im Detail
 

Abap 7 02 new features - new string functions

  • 1. ABAP 7.02 New Features New String Functions Johann Fößleitner, Cadaxo GmbH https://twitter.com/foessleitnerj
  • 2. Table of Contents ➤ cmax/cmin – character like extreme value function ➤ condense – condensation function ➤ concate_lines_of – linking function ➤ escape – escape function ➤ insert – insert function ➤ match – match function ➤ repeat – repeat function ➤ replace – replace function ➤ reverse – reverse function ➤ shift_left/shift_right – shift function ➤ substring – substring function ➤ to_upper/to_lower/… - upper and lower case function ➤ translate – translate function ➤ distance – distance function
  • 3. cmax/cmin – character like extreme value function • comparison up to a value of 9 character like arguments • result is the smallest (cmin) or the biggest (cmax) delivered character • comparison is used codepage-based
  • 4. cmax/cmin – character like extreme value function l_result = cmax( val1 = 'AAAC' val2 = 'AAAB' val3 = 'AAAD' ). result: AAAD l_result = cmax( val1 = 'AAAC' val2 = 'AZAB' val3 = 'AAAD' ). result: AZAB l_result = cmin( val1 = 'AAAC' val2 = 'AAAB' val3 = 'AAAD' ). result : AAAB l_result = cmin( val1 = 'AAAC' val2 = '0AAC' val3 = 'AAAD' ). result : 0AAC
  • 5. condense – condensation function • condensates the content of a string • provides more possibilities than the ABAP Command Condense • removes leading and ending character l_string = condense( val = ‘XXXabcXXXdefXXX‘ del = ‘X‘ from = ‘X‘ to = ‘X‘ ). result: abcXdef
  • 6. concat_lines_of – linking function • links lines from an intern table in a string • additive sep enables the seperation by a seperator L_string = concate_lines_of( table = tab sep = ‘;‘ ).
  • 7. escape – escape function • enables the rule-based replacing of a string with escape symbols • usable rules are defined as constants in CL_ABAP_FORMAT
  • 8. escape – escape function DATA l_string0 TYPE string. DATA l_string1 TYPE string. l_string0 = 'http://www.cadaxo.com'. l_string1 = escape( val = l_string0 format = cl_abap_format=>e_url_full ). WRITE: / l_string0, / l_string1. result: http://www.cadaxo.com http%3A%2F%2Fwww.cadaxo.com
  • 9. insert – insert function • insert a string at any position of another string L_string = ‘NewsABAP‘. L_result = insert( val = l_string sub = ‘ in ‘ off = 5 ). Write: l_string. result: news in ABAP
  • 10. match – match function • searches for a text with a specific Regex accordance • more information of Regex can be gathered from SAP online documentation
  • 11. repeat – repeat function • generates a string through repitition of another string l_string = repeat( val = ‘ABC‘ occ = 5 ). write: l_string. result: ABCABCABCABCABC
  • 12. replace – replace function • replaces a section of a string • section can be determined by an offset-/length or by Regex l_result = replace( val = 'ABAP xx GOOD' off = 6 len = 0 with = 'IS' ). result: ‘ABAP xISx GOOD‘ l_result = replace( val = 'ABAP xx GOOD' off = 4 len = 4 with = 'IS' ). result: ‘ABAPISGOOD‘
  • 13. reverse – reverse function • reverses a complete string L_string = ‘PABA‘. L_string = reverse( l_string ). result: ABAP PS: If you know a useful application of this function, please let me know!
  • 14. substring, substring_... – substring function • investigation of a section from a given character amount l_result = substring( val = 'ABCDEFGH' off = 3 len = 4 ). result: ‘DEFG‘ l_result = substring_from( val = 'ABCDEFGH' sub = 'DEF' ). result: ‘DEFGH‘ l_result = substring_after( val = 'ABCDEFGH' sub = 'DEF' ). result: ‘GH‘ l_result = substring_before( val = 'ABCDEFGH' sub = 'DEF' ). result: ‘ABC‘ l_result = substring_to( val = 'ABCDEFGH' sub = 'DEF' ). result: ‘ABCDEF‘
  • 15. to_upper, to_lower, to_mixed, from_mixed upper and lower case function • to_upper/to_lower conforms the command TRANSLATE TO UPPER/LOWER CASE • to_mixed transforms all letters from the second position on in lower cases • from_mixed inserts from left to right from the second position on the first declared character from the additive sep • further additives are case and min
  • 16. to_upper, to_lower, to_mixed, from_mixed upper and lower case function l_result = to_mixed( val = 'CADAXO GMBH' ). result: ‘Cadaxo gmbh‘
  • 17. distance – distance function • investigates the edit distance (Levenshtein-distance) of to strings • minimal amount of insert, delete or replace processes to get from string 1 to string 2 l_int = distance( val1 = 'CADAXO GMBH' val2 = 'ADAXOGMBH' ). result: 2 („C“ and a blank have to be inserted) l_int = distance( val1 = 'ABCD' val2 = 'EFGH' ). result: 4 (all characters have to be replaced) http://de.wikipedia.org/wiki/Levenshtein-Distanz
  • 18. Cadaxo gmbh, founded in 2009, set out to simplify the SAP working environment with small add-ons. SQL Cockpit 2.0 – the most efficient Analysis add on for SAP environments, business users, software developers and support alike. SQL Cockpit enable quick and flexible data retrievel (without report development and without transports) directly in the SAP productive system. http://www.cadaxo.com/content/en/products/sql-cockpit.html http://com.slideshare.net/cadaxogmbh http://www.youtube.com/CadaxoGmbH http://www.linkedin.com/company/cadaxo-gmbh https://twitter.com/cadaxo
  • 19. The multiplication or the translation of this document or sections out of it is without the expressively authorisation of Cadaxo GmbH prohibited. SAP®, ABAP™, R/3®, SAP NetWeaver® are brands or registered brands of the SAP AG. All other products are brands or registered brands of the particular company. © 2013 Cadaxo GesmbH. All rights reserved.