SADL_V_EXP_Query

DDL: SADL_V_EXP_QUERY SQL: SADL_V_E_QUERY Type: view

view_label

SADL_V_EXP_Query is a CDS View that provides data about "view_label" in SAP S/4HANA. It reads from 1 data source (snwd_so) and exposes 20 fields with key field salesOrderKey. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
snwd_so snwd_so from

Associations (1)

CardinalityTargetAliasCondition
[0..*] SADL_V_EXP_SalesOrderItem items node_key = items.salesOrderItemKey

Annotations (4)

NameValueLevelField
AbapCatalog.sqlViewName SADL_V_E_QUERY view
EndUserText.label view_label view
AccessControl.authorizationCheck #NOT_REQUIRED view
Analytics.query true view

Fields (20)

KeyFieldSource TableSource FieldDescription
KEY salesOrderKey node_key
salesOrderId so_id
createdBy created_by
createdAt created_at
changedBy changed_by
changedAt changed_at
currencyCode currency_code
grossAmount gross_amount
netAmount net_amount
taxAmount tax_amount
lifecycleStatus lifecycle_status
billingStatus billing_status
deliveryStatus delivery_status
Items items
buyerGuid buyer_guid
Customer customer
businessPartnerId customer businessPartnerId
companyName customer company_name
companyEmailAddress customer email_address
companyWebAddress customer web_address
@AbapCatalog.sqlViewName: 'SADL_V_E_QUERY'
@EndUserText.label: 'view_label'
@AccessControl.authorizationCheck: #NOT_REQUIRED

@Analytics.query : true
define view SADL_V_EXP_Query
  as select from snwd_so 
  association  [0..*]
    to SADL_V_EXP_SalesOrderItem as items // via backlink --> not yet possible

    on node_key = items.salesOrderItemKey
  association 
    to SADL_V_EXP_BusinessPartner as customer
    on buyer_guid = customer.businessPartnerKey
{
    key node_key as salesOrderKey,
    so_id        as salesOrderId,
    created_by   as createdBy,   
    created_at   as createdAt,
    changed_by   as changedBy,
    changed_at   as changedAt,
    @Semantics.currencyCode 
    currency_code as currencyCode,
    @Semantics.amount.currencyCode: 'currencyCode' 
    @DefaultAggregation: #SUM
    gross_amount as grossAmount ,
    @Semantics.amount.currencyCode: 'currencyCode' 
    net_amount   as netAmount,
    @Semantics.amount.currencyCode: 'currencyCode' 
    tax_amount   as taxAmount,
    lifecycle_status as lifecycleStatus,
    billing_status   as billingStatus,
    delivery_status  as deliveryStatus,

    items            as Items,     // make the association public


    buyer_guid       as buyerGuid, // needed for association customer

    customer         as Customer,   // make the association public

    @Consumption.labelElement : 'companyName'
    customer.businessPartnerId as businessPartnerId,
    @DefaultAggregation: #NONE
    customer.company_name as companyName,
    @DefaultAggregation: #NONE
    customer.email_address as companyEmailAddress,
    @Consumption.groupWith : 'businessPartnerId'
    customer.web_address as companyWebAddress

}