Quantcast
Channel: SAP FREE Tutorials
Viewing all articles
Browse latest Browse all 211

How to use String Functions in ABAP CDS Views

$
0
0

Hello everyone,

In this ABAP CDS View tutorial, you will learn how to use String Functions in ABAP CDS Views.To access all ABAP CDS Views tutorials click here. Lets get started.

Prerequisites

  • You have installed Eclipse IDE( Mars Version )on your local machine.Click here to know more about.
  • You have installed ABAP Development Tools in Eclipse IDE.
  • You have access to minimum ABAP Netweaver 7.4 on HANA.
  • You have created ABAP Project in eclipse to connect to ABAP Netweaver 7.4 system.Click hereto know how to create ABAP Project.

Below is the list of String Functions in ABAP CDS Views

CONCAT(arg1, arg2)

CONCAT(arg1, agr2) string function can be used to concatenate two character strings.

@AbapCatalog.sqlViewName: 'ZCDS_STR_FUN'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'String Functions'
define view Zcds_Sql_Func as select from kna1 {

    // CONCATENATE name1 & name2 
    CONCAT( kna1.name1, kna1.name2 ) as full_name
}

CONCAT_WITH_SPACE(arg1, arg2, spaces)

This string function is used to concatenate two character strings with space. The number of blanks between the arguments arg1 and arg2 is specified in spaces.

@AbapCatalog.sqlViewName: 'ZCDS_STR_FUN'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'String Functions'
define view Zcds_Sql_Func as select from kna1 {

    // CONCATENATE name1 & name2 with 4 space
    CONCAT_WITH_SPACE( kna1.name1, kna1.name2, 4 ) as full_name
}

SUBSTRING(arg, pos, len)

 

 

 

 

The post How to use String Functions in ABAP CDS Views appeared first on SAP Fiori,SAP HANA,SAPUI5,SAP Netweaver Gateway Tutorials,Interview Questions|SAP Learners.


Viewing all articles
Browse latest Browse all 211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>