Srf_RuSumIntSPLedger

DDL: SRF_RUSUMINTSPLEDGER SQL: SRFRUSUMINTSPL Type: view

Add two integer values together

Srf_RuSumIntSPLedger is a CDS View that provides data about "Add two integer values together" in SAP S/4HANA. It reads from 1 data source (I_SAPClient) and exposes 1 field.

Data Sources (1)

SourceAliasJoin Type
I_SAPClient I_SAPClient from

Parameters (2)

NameTypeDefault
P_Amount1 abap.char(19)
P_Amount2 abap.char(19)

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName SRFRUSUMINTSPL view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_ALLOWED view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Add two integer values together view
ObjectModel.usageType.serviceQuality #P view

Fields (1)

KeyFieldSource TableSource FieldDescription
int8endendasSumResult
@AbapCatalog.sqlViewName: 'SRFRUSUMINTSPL'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_ALLOWED
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Add two integer values together'
@ObjectModel.usageType.serviceQuality: #P
define view Srf_RuSumIntSPLedger
  with parameters
    P_Amount1 : abap.char(19), //19 is maximum possible length that allows cast as int8

    P_Amount2 : abap.char(19)
  as select from I_SAPClient //dummy select, CDS view only used for calculations


{
  case $parameters.P_Amount1
    when '' then case $parameters.P_Amount2
                   when '' then 0
                           else cast( cast($parameters.P_Amount2 as abap.numc( 19 ) ) as abap.int8)
                 end
            else case $parameters.P_Amount2
                    when '' then cast( cast($parameters.P_Amount1 as abap.numc( 19 ) ) as abap.int8)
                            else cast( cast($parameters.P_Amount1 as abap.numc( 19 ) ) as abap.int8)
                               + cast( cast($parameters.P_Amount2 as abap.numc( 19 ) ) as abap.int8)
                 end
  end                                                                                                   as SumResult
}