ATOV_PPL_MERGE_CHANGES_BASE

CDS View

ATO - PPL Merge Changes Base

ATOV_PPL_MERGE_CHANGES_BASE is a CDS View in S/4HANA. ATO - PPL Merge Changes Base. It contains 7 fields. 2 CDS views read from this table.

CDS Views using this table (2)

ViewTypeJoinVDMDescription
atov_ppl_merge_changes view_entity from ATO - PLL Merge Changes
ATOV_PPL_MERGE_STAGING_BASE view_entity inner ATO - PPL Merge Staging Base

Fields (7)

KeyField CDS FieldsUsed in Views
KEY ItemId ItemId 1
KEY ItemType ItemType 1
ItemDescription ItemDescription 2
LastBranchActionAt LastBranchActionAt 1
LastNotificationAt ChangedAt 1
LastNotificationBy ChangedBy 1
Status DifferenceToMainline,Status 2
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_ALLOWED
@EndUserText.label: 'ATO - PPL Merge Changes Base'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #S,
  dataClass: #MIXED
}
define view entity atov_ppl_merge_changes_base
  as select from    ato_xc_item as Item
    left outer join ato_items   as MainlineItem on  MainlineItem.item_type = Item.item_type
                                                and MainlineItem.item_id   = Item.item_id
                                                and MainlineItem.timestamp = 0
{
  key Item.item_type              as ItemType,
  key Item.item_id                as ItemId,
      Item.item_description       as ItemDescription,
      case
          when MainlineItem.item_id is null then cast('N' as ato_col_item_status preserving type )  // item does not exist in mainline --> new item

          when Item.last_branch_action_at >= Item.last_notification then                            // item was not changed since the last branch action

              case
               when Item.item_status = 'D' then cast('O' as ato_col_item_status preserving type)    // map to unchanged deleted

               else cast('U' as ato_col_item_status preserving type)                                // map to unchanged

              end
          else cast(Item.item_status as ato_col_item_status preserving type)                        // item was changed since last branch action --> keep item status

      end                         as Status,
      Item.last_notification      as LastNotificationAt,
      Item.last_notification_by   as LastNotificationBy,
      Item.last_branch_action_at  as LastBranchActionAt,
      Item.collection_item_status as CollectionItemStatus
}
where
        not(
          Item.item_status               = 'D' // Don't include newly created items in PPL which were deleted afterwards

          and Item.last_branch_action_at = 0 // and haven't been part of a branch action (ppl merge / ppl rebase) yet

        )