VALLEADINGITEMWITHGROUPID

DDL: VALLEADINGITEMWITHGROUPID SQL: VALLEADGROUPID Type: view

VALLEADINGITEMWITHGROUPID is a CDS View in SAP S/4HANA. It reads from 2 data sources (VALUATIONLEADINGITEM, fins_cls_wl) and exposes 6 fields with key fields ledger, companycode, fiscalyear.

Data Sources (2)

SourceAliasJoin Type
VALUATIONLEADINGITEM invoiceList inner
fins_cls_wl wl from

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName VALLEADGROUPID view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (6)

KeyFieldSource TableSource FieldDescription
KEY ledger fins_cls_wl ledger
KEY companycode fins_cls_wl companycode
KEY fiscalyear fins_cls_wl fiscalyear
group_id fins_cls_wl group_id
clearingdate fins_cls_wl clearingdate
IsClearedAtKeyDate fins_cls_wl is_cleared_at_keydate
@AbapCatalog.sqlViewName: 'VALLEADGROUPID'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel: {
                usageType.serviceQuality: #D,
                usageType.sizeCategory: #XXL,
                usageType.dataClass: #MIXED }
@ClientHandling.algorithm: #SESSION_VARIABLE
define view VALLEADINGITEMWITHGROUPID
  as select from fins_cls_wl          as wl
    inner join            VALUATIONLEADINGITEM as invoiceList on  invoiceList.accountingdocument             = wl.accountingdocument
                                                              and invoiceList.ledgergllineitem               = wl.ledgergllineitem
                                                              and invoiceList.ledger                         = wl.ledger
                                                              and invoiceList.companycode                    = wl.companycode
                                                              and invoiceList.fiscalyear                     = wl.fiscalyear
                                                              and invoiceList.jrnlperiodendclosingrunloguuid = wl.jrnlperiodendclosingrunloguuid
{
      //select group id from item which has the minimal docln in one splitted document group

      //e.g.

      // groupID/accountingdocument/accountingdocumentitem/docln

      // ABC/1/1/1

      // DEF/1/1/2

      // With this data set the first line(ABC/1/1/1) will be selected

  key wl.accountingdocument,
  key invoiceList.accountingdocumentitem,
  key wl.ledger,
  key wl.companycode,
  key wl.fiscalyear,
      wl.group_id,
      wl.grouping_rule,
      wl.grouping_rule_step,
      wl.jrnlperiodendclosingrunloguuid,
      wl.ledgergllineitem,
      wl.marked_for_deletion,
      wl.valuation_rule_step,
      wl.clearingdate,
      wl.clearingaccountingdocument,
      wl.clearingdocfiscalyear,
      wl.is_cleared_at_keydate as IsClearedAtKeyDate
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"VALUATIONLEADINGITEM",
"FINS_CLS_WL"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/